We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
man fzf
fzf --version
0.53.0 (brew)
Since commit 83b6033 (main.go), I noticed a panic when killing a script, where fzf runs.
main.go
panic
fzf
--- a/main.go +++ b/main.go @@ -36,5 +36,5 @@ func printScript(label string, content []byte) { func exit(code int, err error) { - if err != nil { + if code == fzf.ExitError { fmt.Fprintln(os.Stderr, err.Error()) }
Run this small script in a terminal tab; the $$ is copied to your clipboard (macOS only).
$$
#!/usr/bin/env bash echo $$ | pbcopy : | FZF_DEFAULT_OPTS="" fzf
In a second terminal tab, run the following:
kill -15 <copied_pid>
Examine the first terminal tab and notice the panic.
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xb286143] goroutine 1 [running]: main.exit(0x2, {0x0?, 0x0?}) github.com/junegunn/fzf/main.go:39 +0x23 main.main() github.com/junegunn/fzf/main.go:81 +0x198
Maybe check for nil or have a dedicated message for nil?
if code == fzf.ExitError && err != nil
The text was updated successfully, but these errors were encountered:
94c33ac
Thanks, nice find.
Sorry, something went wrong.
No branches or pull requests
Checklist
man fzf
)Output of
fzf --version
0.53.0 (brew)
OS
Shell
Problem / Steps to reproduce
Since commit 83b6033 (
main.go
), I noticed apanic
when killing a script, wherefzf
runs.to reproduce
Run this small script in a terminal tab; the
$$
is copied to your clipboard (macOS only).In a second terminal tab, run the following:
Examine the first terminal tab and notice the panic.
possible solution
Maybe check for nil or have a dedicated message for nil?
The text was updated successfully, but these errors were encountered: