run_locally (lib/capistrano/recipes/deploy.rb)

    # File lib/capistrano/recipes/deploy.rb, line 100
    def run_locally(cmd)
      logger.trace "executing locally: #{cmd.inspect}" if logger
      output_on_stdout = nil
      elapsed = Benchmark.realtime do
        output_on_stdout = `#{cmd}`
      end
      if $?.to_i > 0 # $? is command exit code (posix style)
        raise Capistrano::LocalArgumentError, "Command #{cmd} returned status code #{$?}"
      end
      logger.trace "command finished in #{(elapsed * 1000).round}ms" if logger
      output_on_stdout
    end