I’m using fish as my shell, so I have the following in my ~/.config/fish/config.fish file:
if test -x $HOME/.bun/bin/bun
if ! set --global --query BUN_INSTALL
set --global --export BUN_INSTALL $HOME/.bun
end
if ! contains $HOME/.bun/bin $PATH && ! contains $HOME/.bun/bin $fish_user_paths
fish_add_path --path $HOME/.bun/bin
end
if ! test -s completions/bun.fish
bun completions
end
end
If I ensure that ~/.config/fish/completions/bun.fish is missing, then I get a crash like this on every command execution:
error: BrokenPipe
----- bun meta -----
Bun v0.6.2 (8d90d795) macOS Silicon 22.4.0
Unknown:
Elapsed: 5ms | User: 1ms | Sys: 1ms
RSS: 3.74MB | Peak: 3.74MB | Commit: 0B | Faults: 28
----- bun meta -----
0 0x104e00de0 WTFGetBacktrace
Crash report saved to:
~/.bun/.bun-crash/v0.6.2-1684639802784.crash
Search GitHub issues https://bun.sh/issues or ask for #help in https://bun.sh/discord
If I run bun completions on the command line (fully interactive), I do not get this error (which will also prevent the error, but that is only because bun completions is not running without an stty). This may be related to my use of an asynchronous fish shell prompt, but bun completions should not be crashing. The crash happens before the file gets written.
What is the expected behavior?
Bun should not crash.
What do you see instead?
Bun crashes.
Additional information
With feature request #2978 (it will be filed after this issue is filed and I will backfill it), this should not be an issue.
What version of Bun is running?
0.6.2
What platform is your computer?
Darwin 22.4.0 arm64 arm
What steps can reproduce the bug?
I’m using fish as my shell, so I have the following in my
~/.config/fish/config.fish
file:If I ensure that
~/.config/fish/completions/bun.fish
is missing, then I get a crash like this on every command execution:If I run
bun completions
on the command line (fully interactive), I do not get this error (which will also prevent the error, but that is only becausebun completions
is not running without an stty). This may be related to my use of an asynchronous fish shell prompt, butbun completions
should not be crashing. The crash happens before the file gets written.What is the expected behavior?
Bun should not crash.
What do you see instead?
Bun crashes.
Additional information
With feature request #2978 (it will be filed after this issue is filed and I will backfill it), this should not be an issue.