From 764316a53d0eb60b315f0bbcd513de58ed57a876 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Fri, 26 Mar 2021 16:12:54 +0900 Subject: [PATCH] Fix flaky test case: test_interrupt_execute Try to avoid extraneous INT signal --- src/terminal.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/terminal.go b/src/terminal.go index 263e2c54..59851a0c 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -1722,24 +1722,22 @@ func (t *Terminal) executeCommand(template string, forcePlus bool, background bo } command := t.replacePlaceholder(template, forcePlus, string(t.input), list) cmd := util.ExecCommand(command, false) + t.executing.Set(true) if !background { cmd.Stdin = tui.TtyIn() cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr t.tui.Pause(true) - t.executing.Set(true) cmd.Run() - t.executing.Set(false) t.tui.Resume(true, false) t.redraw() t.refresh() } else { t.tui.Pause(false) - t.executing.Set(true) cmd.Run() - t.executing.Set(false) t.tui.Resume(false, false) } + t.executing.Set(false) cleanTemporaryFiles() }