vscode
vscode copied to clipboard
WSL terminals cannot be started anymore on Windows 10
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.101.0
- OS Version: Windows 10 Pro 19045.5917
Steps to Reproduce:
- Open any WSL terminal
- Get an error about bash.exe not recognizing the -d option
/bin/bash: -d: invalid option
Usage: /bin/bash [GNU long option] [option] ...
/bin/bash [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--pretty-print
--rcfile
--restricted
--verbose
--version
Shell options:
-ilrsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCEHPT or -o option
The bogus commit is 2d35c6fb74cfb4f63b00f46baa18948afea5365f. It's forcing bash.exe instead of wsl.exe on Windows 10 which doesn't know how to run WSL.
For now I had to add my own versions of the same thing:
"terminal.integrated.profiles.windows": {
"Debian": {
"path": [
"${env:windir}\\System32\\wsl.exe"
],
"args": ["-d", "Debian"],
"icon": "terminal-debian"
},
"Ubuntu": {
"path": [
"${env:windir}\\System32\\wsl.exe"
],
"args": ["-d", "Ubuntu"],
"icon": "terminal-ubuntu"
},
...
}