Reputation: 1139
I'm trying to run execute on a command like below in my deploy.rb:
results = execute 'somecommand'
It does not seem that execute
returns the results of the command. What is the correct way to do this?
Upvotes: 2
Views: 1129
Reputation: 11082
You want to use the capture
command.
result = capture(:echo, "hello world")
result # => "hello world"
An example is also shown on the home page of the Capistrano docs: http://capistranorb.com
Upvotes: 6