Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions communicator/ssh/communicator.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,14 @@ 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("Remote command exited without exit status or exit signal.")
exitStatus = -1
log.Printf("Remote command exited without exit status or " +
"exit signal. If your ssh server restarted intentionally, " +
"you can safely ignore this. Continuing.")
default:
log.Printf("Error occurred waiting for ssh session: %s", err.Error())
exitStatus = -1
log.Printf("Error occurred waiting for ssh session: %s. Continuing.", err.Error())
}
}
cmd.SetExited(exitStatus)
Expand Down