lib/kitchen/transport/ssh.rb in test-kitchen-1.9.2 vs lib/kitchen/transport/ssh.rb in test-kitchen-1.10.0

- old
+ new

@@ -122,11 +122,13 @@ return if command.nil? logger.debug("[SSH] #{self} (#{command})") exit_code = execute_with_exit_code(command) if exit_code != 0 - raise Transport::SshFailed, - "SSH exited (#{exit_code}) for command: [#{command}]" + raise Transport::SshFailed.new( + "SSH exited (#{exit_code}) for command: [#{command}]", + exit_code + ) end rescue Net::SSH::Exception => ex raise SshFailed, "SSH command failed (#{ex.message})" end