Skip to content

Instantly share code, notes, and snippets.

@SteveBenner
Created November 6, 2013 09:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SteveBenner/7333298 to your computer and use it in GitHub Desktop.
Save SteveBenner/7333298 to your computer and use it in GitHub Desktop.
Capistrano DSL addition for executing a command under a specific working directory
# allows one to specify the working directory for command execution
def execute_at(path, cmd)
execute "cd #{path} && #{cmd}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment