If the exec'd command executed on its own, don't print a term reason out, just pass through the code
This commit is contained in:
1 parent
3400e20fb6
commit
9bd6045c46
1 file changed
+2
-7
@@ -647,13 +647,8 @@ func (c *Command) Run(args []string) (retCode int) {
|
||||
termInfo.Reason = "Session has expired"
|
||||
default:
|
||||
if c.execCmdReturnValue != nil {
|
||||
r := c.execCmdReturnValue.Load()
|
||||
switch r {
|
||||
case 0:
|
||||
termInfo.Reason = ""
|
||||
default:
|
||||
termInfo.Reason = fmt.Sprintf("Executed command exited with code %d", r)
|
||||
}
|
||||
// Don't print out in this case, so ensure we clear it
|
||||
termInfo.Reason = ""
|
||||
} else {
|
||||
if c.connectionsLeft.Load() == 0 {
|
||||
termInfo.Reason = "No connections left in session"
|
||||
|
||||
Reference in new issue
Block a user