Skip to content
This repository has been archived by the owner on Mar 21, 2018. It is now read-only.

Commit

Permalink
Log SSH response data
Browse files Browse the repository at this point in the history
  • Loading branch information
justincampbell committed Nov 28, 2012
1 parent 77f7790 commit 17ca894
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/ridley/ssh/worker.rb
Expand Up @@ -38,10 +38,12 @@ def run(host, command)

channel.on_data do |ch, data|
response.stdout += data
info data
end

channel.on_extended_data do |ch, type, data|
response.stderr += data
error data
end

channel.on_request("exit-status") do |ch, data|
Expand All @@ -63,6 +65,7 @@ def run(host, command)
[ :ok, response ]
else
error "Successfully ran SSH command on: '#{host}' as: '#{user}', but it failed"
error response.stdout
[ :error, response ]
end
rescue => e
Expand Down

0 comments on commit 17ca894

Please sign in to comment.