From 377eced31adb9aa636896fea60060f9f8a9de910 Mon Sep 17 00:00:00 2001 From: stk Date: Thu, 26 Jan 2023 13:03:42 +0100 Subject: [PATCH] Always prompt to return from subprocess if there was an error Except when we are running integration tests, in which case we never want to prompt because there wouldn't be a way to confirm the prompt. --- pkg/gui/gui.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go index ba759505a..9de9ca2bc 100644 --- a/pkg/gui/gui.go +++ b/pkg/gui/gui.go @@ -824,7 +824,7 @@ func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { //nolint:unpara subprocess.Stderr = io.Discard subprocess.Stdin = nil - if gui.Config.GetUserConfig().PromptToReturnFromSubprocess { + if gui.integrationTest == nil && (gui.Config.GetUserConfig().PromptToReturnFromSubprocess || err != nil) { fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint(gui.Tr.PressEnterToReturn)) // scan to buffer to prevent run unintentional operations when TUI resumes.