From 4e93e60313d8c0be9c80b20be98332e50de65f1f Mon Sep 17 00:00:00 2001 From: Matthew Hooker Date: Thu, 6 Oct 2016 11:13:30 -0700 Subject: [PATCH] log unknown error, make ExitMissingError clearer --- communicator/ssh/communicator.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/communicator/ssh/communicator.go b/communicator/ssh/communicator.go index c96603560..bc4d0f40b 100644 --- a/communicator/ssh/communicator.go +++ b/communicator/ssh/communicator.go @@ -115,12 +115,12 @@ func (c *comm) Start(cmd *packer.RemoteCmd) (err error) { switch err.(type) { case *ssh.ExitError: exitStatus = err.(*ssh.ExitError).ExitStatus() - log.Printf("remote command exited with '%d': %s", exitStatus, cmd.Command) + log.Printf("Remote command exited with '%d': %s", exitStatus, cmd.Command) case *ssh.ExitMissingError: - log.Printf(err.Error()) + log.Printf("Remote command exited without exit status or exit signal.") exitStatus = -1 default: - log.Printf("unknown error occurred waiting for ssh session.") + log.Printf("Error occurred waiting for ssh session: %s", err.Error()) exitStatus = -1 } }