Vscode-remote-release: Cannot launch when default shell is Fish

Created on 15 May 2019  路  7Comments  路  Source: microsoft/vscode-remote-release

After restarting VSCode, the vscode server updated and it now fails to initialise when Fish is the default shell (it used to work just fine) see the error in the screenshot below:

image
/usr/bin/fish: unrecognized option '--port=0'

This looked similar to #33, but the error is different to what is reported there and this is for the WSL, not SSH.

  • VSCode Version: 1.34.20-insider
  • Local OS Version: Windows 10 1809
  • Remote OS Version: Ubuntu 18.04
  • Remote Extension/Connection Type: SSH/Docker/WSL

Steps to Reproduce:

  1. Install Fish (if not installed)
  2. Change default WSL shell to Fish: chsh $(which fish)
  3. Launch a "Remote - WSL" session

Does this issue occur when you try this locally?: Yes/No
Does this issue occur when you try this locally and all extensions are disabled?: Yes/No

-- Edit --

Workaround was posted by @hasefumi23 in https://github.com/microsoft/vscode-remote-release/issues/328#issuecomment-492668024

A slightly cleaner way around this for now is to run chsh -s /bin/bash to change your shell back to bash and then set "terminal.integrated.shell.linux": "/usr/bin/fish" in your remote settings.json

wsl

Most helpful comment

No worries, I'll fix this asap. Hopefully, the new version with the fix is out tomorrow.

All 7 comments

I meet the same problem. As is said above, This looked similar to #33, but the error is different to what is reported there and this is for the WSL, not SSH.

@roblourens As stated in my issue - I don't think this is a duplicate of #33. It's to do with with the arguments being passed to fish. This only broke yesterday after upgrading. Previously it worked fine.

Also this is for WSL not SSH like the other issue.

My suspicion is that "Remote - WSL" updated to using the default shell instead of forcing bash. But it tries to pass bash parameters such as --port=0

Sorry for not reading closely

A way around this for now is to run chsh -s /bin/bash to change your shell back to bash and then set "terminal.integrated.shell.linux": "/usr/bin/fish" in your remote settings.json - though this does result in bash loading up when you start a terminal in anything other than remote vscode.

I've updated the issue with this and the workaround from #328

No worries, I'll fix this asap. Hopefully, the new version with the fix is out tomorrow.

@aeschli Can confirm working as normal with Fish set as my default shell. Thanks for turning this around so quick!

Was this page helpful?
0 / 5 - 0 ratings