summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2021-03-26 16:12:54 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2021-03-26 17:40:12 +0900
commit764316a53d0eb60b315f0bbcd513de58ed57a876 (patch)
tree064598c6cf8f3a249c4a9f3cf1ccb3d6cf18f6d3
parent2048fd40426c3f430049218a0b9d1c1680b977ef (diff)
Fix flaky test case: test_interrupt_execute
Try to avoid extraneous INT signal
-rw-r--r--src/terminal.go6
1 files 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()
}