Repository navigation
Closed
Description
-
Your Windows build number: 18362.239
-
What you're doing and what's happening:
I'm using the Ubuntu-18.04 image from the microsoft store (wsl v1), added fish and made it my default shell usingchsh -s /usr/bin/fish. Works so far.
Today I tried to use VScode with the remote development extension, configuring it for WSL. After starting it, vscode shows an error and prints following output in a terminal:
[2019-07-11 08:24:12.789] Starting VS Code Server inside WSL (Ubuntu-18.04)
[2019-07-11 08:24:12.789] Extension version: 0.38.9, Windows build: 18362. Multi distro support: enabled. WSL path support: enabled
[2019-07-11 08:24:13.093] Probing if server is already installed: C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 bash -c "[ -d ~/.vscode-server/bin/2213894ea0415ee8c85c5eea0d0ff81ecc191529 ] && echo found || echo missing"
[2019-07-11 08:24:13.847] Server install found in WSL
[2019-07-11 08:24:13.847] Launching C:\WINDOWS\System32\wsl.exe -d Ubuntu-18.04 bash -c "'$(wslpath -u 'c:/Users/max06/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.9/scripts/wslServer.sh')' '2213894ea0415ee8c85c5eea0d0ff81ecc191529' 'stable' '.vscode-server' '' 0 " in c:\Users\max06\.vscode\extensions\ms-vscode-remote.remote-wsl-0.38.9
[2019-07-11 08:24:14.623] fish: $(...) is not supported. In fish, please use '(wslpath)'.
[2019-07-11 08:24:14.623] bash -c "'$(wslpath -u 'c:/Users/max06/.vscode/extensions/ms-vscode-remote.remote-wsl-0.38.9/scripts/wslServer.sh')' '2213894ea0415ee8c85c5eea0d0ff81ecc191529' 'stable' '.vscode-server' '' 0 "
[2019-07-11 08:24:14.623] ^
[2019-07-11 08:24:14.623] VS Code Server for WSL closed unexpectedly.
[2019-07-11 08:24:14.623] For help with startup problems, go to
[2019-07-11 08:24:14.623] https://code.visualstudio.com/docs/remote/troubleshooting#_wsl-tips
- What's wrong / what should be happening instead:
As I understand the output, vscode is launching a terminal calling wsl withbash -cas command. Somehow it still ends up in fish.
When I change my default shell back to bash, it works without issues.
There's a high chance I missunderstood the concept here, in that case I'm happy about an explanation. Or I just missed a small little detail... anyways: Thanks for taking care!
Metadata
Metadata
Assignees
Labels
No labels
Activity
benhillis commentedon Jul 11, 2019
This is an issue with VsCode. They should not be using bash -c to launch their vscode remote script, they should be using /bin/sh.
max06 commentedon Jul 11, 2019
Ben Hillis (@benhillis)
Thank you for your reply.
Just wondering: wsl.exe should call the argument provided, in this case
bash -c "...". Even trying this in a regular command promt, I end up in fish, not bash.Example:
I can call bash directly, without wsl.exe and I end up in bash.
Edit: Going one step further:
That means wsl opens my default shell and executes the command in there then?
benhillis commentedon Jul 11, 2019
Flo (@max06) - Wsl always uses your default shell when launching processes, unless you specify the -e option, for example:
wsl.exe -e bash -c psmax06 commentedon Jul 11, 2019
Ben Hillis (@benhillis) - That's good to know! I'll include this in the issue I'm currently writing in the vscode-project.
Thank you very much!