communicator/ssh: add what error details we can for the user

ssh.Waitmsg's String() method provides output which can include the
process status, signal, and message
This commit is contained in:
Adam Shannon 2017-09-12 17:40:33 -05:00
parent d477d1f6d4
commit c9c2823f62
1 changed files with 1 additions and 1 deletions

View File

@ -467,7 +467,7 @@ func (c *Communicator) scpSession(scpCommand string, f func(io.Writer, *bufio.Re
if exitErr, ok := err.(*ssh.ExitError); ok {
// Otherwise, we have an ExitErorr, meaning we can just read
// the exit status
log.Printf("non-zero exit status: %d", exitErr.ExitStatus())
log.Printf(exitErr.String())
// If we exited with status 127, it means SCP isn't available.
// Return a more descriptive error for that.