lib/ridley/host_connector/winrm.rb in ridley-1.3.1 vs lib/ridley/host_connector/winrm.rb in ridley-1.3.2
- old
+ new
@@ -66,16 +66,18 @@
end
end
response.exit_code = output[:exitcode]
}
rescue ::WinRM::WinRMHTTPTransportError => ex
- response.exit_code = -1
+ response.exit_code = :transport_error
response.stderr = ex.message
end
case response.exit_code
when 0
log.info "Successfully ran WinRM command on: '#{host}' as: '#{user}'"
+ when :transport_error
+ log.info "A transport error occured while attempting to run a WinRM command on: '#{host}' as: '#{user}'"
else
log.info "Successfully ran WinRM command on: '#{host}' as: '#{user}', but it failed"
end
end
ensure