Permalink
Browse files

Merge branch 'mitchellh/process_callback_move'

  • Loading branch information...
2 parents 1d36aea + 4090c25 commit ddc622b95189f6a160cabfb26355451ca9d33e73 @jamis committed Jan 7, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/net/ssh/shell/process.rb
View
3 lib/net/ssh/shell/process.rb
@@ -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

0 comments on commit ddc622b

Please sign in to comment.