diff --git a/lib/ridley/ssh/worker.rb b/lib/ridley/ssh/worker.rb index a14c119..63fbb3c 100644 --- a/lib/ridley/ssh/worker.rb +++ b/lib/ridley/ssh/worker.rb @@ -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| @@ -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