quote :application in capistrano task #317

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@ThomasPr

whenever passes the :application variable from the capistrano deploy script to its command line as follows:

--update-crontab application_name

But in the case that the application variable contains a space, its not treated as a single string but as a further argument. This causes the application name in the crontab to just the string before the first space.

@@ -9,8 +9,8 @@
_cset(:whenever_identifier) { fetch :application }
_cset(:whenever_environment) { fetch :rails_env, "production" }
_cset(:whenever_variables) { "environment=#{fetch :whenever_environment}" }
- _cset(:whenever_update_flags) { "--update-crontab #{fetch :whenever_identifier} --set #{fetch :whenever_variables}" }
- _cset(:whenever_clear_flags) { "--clear-crontab #{fetch :whenever_identifier}" }
+ _cset(:whenever_update_flags) { %Q{--update-crontab "#{fetch :whenever_identifier}" --set #{fetch :whenever_variables}} }

This comment has been minimized.

Show comment Hide comment
@javan

javan May 12, 2013

Owner

Let's stick with double quotes around the options (instead of %Q{}) and use single quotes around #{fetch :whenever_identifier}

@javan

javan May 12, 2013

Owner

Let's stick with double quotes around the options (instead of %Q{}) and use single quotes around #{fetch :whenever_identifier}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment