diff --git a/internal/shell/shell.go b/internal/shell/shell.go index 5bf5973f..9149da9f 100644 --- a/internal/shell/shell.go +++ b/internal/shell/shell.go @@ -101,16 +101,19 @@ func RunInteractiveShell(input string, wait bool, getOutput bool) (string, error c := make(chan os.Signal, 1) signal.Reset(os.Interrupt) signal.Notify(c, os.Interrupt) - cmd.Start() - err = cmd.Wait() + err = cmd.Start() + if err == nil { + err = cmd.Wait() + if wait { + // This is just so we don't return right away and let the user press enter to return + screen.TermMessage("") + } + } else { + screen.TermMessage(err) + } output := outputBytes.String() - if wait { - // This is just so we don't return right away and let the user press enter to return - screen.TermMessage("") - } - // Start the screen back up screen.TempStart(screenb)