Skip to content

Commit

Permalink
RemoteCommandFailed raised only for failure
Browse files Browse the repository at this point in the history
  • Loading branch information
mmnelemane committed Sep 21, 2015
1 parent 52d61f8 commit 86cfc8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cct/remote_command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def exec! command, params=[]
end
session.loop unless gateway
result[:success?] = result.exit_code.zero?
if !result.success? || result.error.length.nonzero?
if !result.success? || (result.error.length.nonzero? && !result.exit_code.zero?)
log.error(result.output)
raise RemoteCommandFailed.new(full_command, result)
end
Expand Down

0 comments on commit 86cfc8e

Please sign in to comment.