Fix panic when parent process is killed

Fix #3863
This commit is contained in:
Junegunn Choi
2024-06-15 10:23:03 +09:00
parent b2ecb6352c
commit 94c33ac020

View File

@@ -39,7 +39,7 @@ func printScript(label string, content []byte) {
}
func exit(code int, err error) {
if code == fzf.ExitError {
if code == fzf.ExitError && err != nil {
fmt.Fprintln(os.Stderr, err.Error())
}
os.Exit(code)