summaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJunegunn Choi <junegunn.c@gmail.com>2024-06-15 10:23:03 +0900
committerJunegunn Choi <junegunn.c@gmail.com>2024-06-15 10:23:03 +0900
commit94c33ac020fd7e846073cabffa5cf13386f3c852 (patch)
treecf33bc8dd17b01696388fcecb37e0108d16e9da7 /main.go
parentb2ecb6352c2ce516a15edce3ea711623ed8a1375 (diff)
downloadfzf-94c33ac020fd7e846073cabffa5cf13386f3c852.tar.gz
Fix panic when parent process is killed
Fix #3863
Diffstat (limited to 'main.go')
-rw-r--r--main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/main.go b/main.go
index d8536819..f32813da 100644
--- a/main.go
+++ b/main.go
@@ -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)