Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Commit

Permalink
Merge branch 'mitchellh/process_callback_move'
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis committed Jan 7, 2011
2 parents 1d36aea + 4090c25 commit ddc622b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/net/ssh/shell/process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,13 @@ def run
manager.channel.on_extended_data(&method(:on_stderr))
manager.channel.on_close(&method(:on_close))

callback.call(self) if callback

cmd = command.dup
cmd << ";" if cmd !~ /[;&]$/
cmd << " DONTEVERUSETHIS=$?; echo #{manager.separator} $DONTEVERUSETHIS; echo \"exit $DONTEVERUSETHIS\"|sh"

send_data(cmd + "\n")
callback.call(self) if callback
end
end

Expand Down

0 comments on commit ddc622b

Please sign in to comment.