What the difference between invoke_command and run?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
With the
invoke_commandyou can use the :via options ot indicate if this has to be invoked bysudoor byrun. This way you can have a single config file that can dosudoorrunbased on a variable (maybe in prod you wantsudobut in dev you want simplerun).So… The
invoke_commandwill callrunby default.Otherwise, they are identical.
Source: http://www.ruby-doc.org/gems/docs/c/capistrano-edge-2.5.6/Capistrano/Configuration/Actions/Invocation.html