log unknown error, make ExitMissingError clearer

This commit is contained in:
Matthew Hooker 2016-10-06 11:13:30 -07:00
parent 286b7836fa
commit 4e93e60313
1 changed files with 3 additions and 3 deletions

View File

@ -115,12 +115,12 @@ func (c *comm) Start(cmd *packer.RemoteCmd) (err error) {
switch err.(type) { switch err.(type) {
case *ssh.ExitError: case *ssh.ExitError:
exitStatus = err.(*ssh.ExitError).ExitStatus() 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: case *ssh.ExitMissingError:
log.Printf(err.Error()) log.Printf("Remote command exited without exit status or exit signal.")
exitStatus = -1 exitStatus = -1
default: default:
log.Printf("unknown error occurred waiting for ssh session.") log.Printf("Error occurred waiting for ssh session: %s", err.Error())
exitStatus = -1 exitStatus = -1
} }
} }