lib/capistrano/recipes/deploy.rb
# logs the command then executes it locally.
# returns the command output as a string
logs the command then executes it locally.
returns the command output as a string
logs the command then executes it locally . returns the command output as a string
def run_locally(cmd)
  logger.trace "executing locally: #{cmd.inspect}" if logger
  output_on_stdout = `#{cmd}`
  if $?.to_i > 0 
    raise Capistrano::LocalArgumentError, "Command #{cmd} returned status code #{$?}"
  end
  output_on_stdout
end
def run_locally ( cmd ) logger . trace "executing locally: #{cmd.inspect}" if logger output_on_stdout = ` #{ cmd } ` if $? . to_i > 0 raise Capistrano :: LocalArgumentError , "Command #{cmd} returned status code #{$?}" end output_on_stdout end
logs the command then executes it locally.
logs the command then executes it locally .
# $? is command exit code (posix style)
cmd
<not_specific>