-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
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
elixir-ls for vscode keeps crashing when using fish as the default shell #374
Comments
Started to get the same, but a different crash error:
|
I noticed this some time ago and have the same problem on WSL2 using fish. It used to work fine though |
I'm getting the equivalent error for |
Hello, and thank you to everyone for helping figure this out! I can confirm this happens on Ubuntu 20.04.6 LTS with The first bit of related code appears here: #!/bin/sh
# Actual launcher. This does the hard work of figuring out the best way
# to launch the language server or the debugger.
# Running this script is a one-time action per project launch, so we opt for
# code simplicity instead of performance. Hence some potentially redundant
# moves here.
# First order of business, see whether we can setup asdf-vm
did_relaunch=$1
# Get the user's preferred shell
preferred_shell=$(basename "$SHELL")
case "${did_relaunch}" in
"")
if [ "$preferred_shell" = "bash" ]; then
>&2 echo "Preffered shell is bash, relaunching"
exec "$(which bash)" "$0" relaunch
elif [ "$preferred_shell" = "zsh" ]; then
>&2 echo "Preffered shell is zsh, relaunching"
exec "$(which zsh)" "$0" relaunch
else
>&2 echo "Preffered shell $preferred_shell is not supported, continuing in POSIX shell"
fi
;;
*)
# We have an arg2, so we got relaunched
;;
esac This script begins with else
>&2 echo "Preffered shell $preferred_shell is not supported, continuing in POSIX shell"
fi At this point, if we've configured any interactive This works fine until we reach line 102:
Here, we encounter But we shouldn't get here! This code is protected by Anyway, to kludge around this issue, you can install But I'm awfully curious about what's actually happening here. |
@emk's workaround works for me... Should perhaps the first line of |
The upcoming release 0.17 will resolve the issue. Fish support has been added and the bash and zsh specific scripts have been extracted to separate files |
Version 0.17 with support for fish and improvements for other shells has been released |
For some reasons, elixir-ls for vscode used to work with fish shell under POSIX but as of right now, it keeps crashing whenever I launch my project. If I switch my default shell to bash, elixir-ls successfully initializes with its server.
I'm using WSL2 Ubuntu with fish shell as the default shell.
Environment
Elixir 1.15.5 (compiled with Erlang/OTP 26)
Crash report template
The text was updated successfully, but these errors were encountered: