Fix flaky test case: test_interrupt_execute

Try to avoid extraneous INT signal
This commit is contained in:
Junegunn Choi
2021-03-26 16:12:54 +09:00
parent 2048fd4042
commit 764316a53d

View File

@@ -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()
}