log unknown error, make ExitMissingError clearer
This commit is contained in:
parent
286b7836fa
commit
4e93e60313
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue