1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-04-25 12:24:47 +02:00

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.
This commit is contained in:
stk 2023-01-26 13:03:42 +01:00 committed by Stefan Haller
parent fadc2893d2
commit 377eced31a

View File

@ -824,7 +824,7 @@ func (gui *Gui) runSubprocess(cmdObj oscommands.ICmdObj) error { //nolint:unpara
subprocess.Stderr = io.Discard subprocess.Stderr = io.Discard
subprocess.Stdin = nil 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)) fmt.Fprintf(os.Stdout, "\n%s", style.FgGreen.Sprint(gui.Tr.PressEnterToReturn))
// scan to buffer to prevent run unintentional operations when TUI resumes. // scan to buffer to prevent run unintentional operations when TUI resumes.