Skip to content

Instantly share code, notes, and snippets.

@lancelakey
Created September 18, 2013 08:34
Show Gist options
  • Save lancelakey/6606290 to your computer and use it in GitHub Desktop.
Save lancelakey/6606290 to your computer and use it in GitHub Desktop.
## This does not work:
execute "rake update" do
cwd "/tmp/"
command "rake update"
end
## From the log:
execute("rake update") do
action "run"
retries 0
retry_delay 2
command "rake update"
backup 5
returns 0
cookbook_name :"foo"
recipe_name "default"
end
## This does work:
execute "rake update" do
command "cd /tmp/ && rake update"
end
## From the log:
execute("rake update") do
action "run"
retries 0
retry_delay 2
command "cd /tmp/ && rake update"
backup 5
returns 0
cookbook_name :"foo"
recipe_name "default"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment