Skip to content

Commit

Permalink
Improving a prior fix for jRuby users, and other people who were stil…
Browse files Browse the repository at this point in the history
…l experiencing problems
  • Loading branch information
leehambley committed Dec 3, 2009
1 parent ab5704a commit af2402f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/capistrano/recipes/deploy.rb
Expand Up @@ -94,9 +94,14 @@ def with_env(name, value)
# returns the command output as a string
def run_locally(cmd)
logger.trace "executing locally: #{cmd.inspect}" if logger
`#{cmd}` and (raise LocalArgumentError("#{cmd} returned status #{$?.to_i}") if ($?.to_i > 0))
output_on_stdout = `#{cmd}`
if $?.to_i > 0 # $? is command exit code (posix style)
raise Capistrano::LocalArgumentError, "Command #{cmd} returned status code #{$?}"
end
output_on_stdout
end


# If a command is given, this will try to execute the given command, as
# described below. Otherwise, it will return a string for use in embedding in
# another command, for executing that command as described below.
Expand Down

0 comments on commit af2402f

Please sign in to comment.