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
No known key found for this signature in database
GPG Key ID: 254BC280FEF9C627

View File

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