Skip to content

Commit

Permalink
Merge pull request #3 from humblec/master
Browse files Browse the repository at this point in the history
Return proper error message to the caller
  • Loading branch information
Luis Pabón committed May 16, 2016
2 parents 62afec7 + 69e33b8 commit 34e5a97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssh/ssh.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ func (s *SshExec) ConnectAndExec(host string, commands []string, timeoutMinutes
if err != nil {
s.logger.LogError("Failed to run command [%v] on %v: Err[%v]: Stdout [%v]: Stderr [%v]",
command, host, err, b.String(), berr.String())
return nil, err
return nil, fmt.Errorf("%s", berr.String())
}
s.logger.Debug("Host: %v Command: %v\nResult: %v", host, command, b.String())
buffers[index] = b.String()
Expand Down

0 comments on commit 34e5a97

Please sign in to comment.