diff options
Diffstat (limited to 'ssh')
| -rw-r--r-- | ssh/session.go | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ssh/session.go b/ssh/session.go index fd10cd1..09eb009 100644 --- a/ssh/session.go +++ b/ssh/session.go @@ -601,5 +601,12 @@ func (w Waitmsg) Lang() string { } func (w Waitmsg) String() string { - return fmt.Sprintf("Process exited with: %v. Reason was: %v (%v)", w.status, w.msg, w.signal) + str := fmt.Sprintf("Process exited with status %v", w.status) + if w.signal != "" { + str += fmt.Sprintf(" from signal %v", w.signal) + } + if w.msg != "" { + str += fmt.Sprintf(". Reason was: %v", w.msg) + } + return str } |
