vscode-shell-launcher
vscode-shell-launcher copied to clipboard
WSL Bash not showing
I configured the settings for the shell launcher as follows:
"shellLauncher.shells.windows": [
{
"shell": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"label": "PowerShell"
},
{
"shell": "C:\\Program Files\\PowerShell\\6.0.0-beta.8\\powershell.exe",
"label": "PowerShell Core"
},
{
"shell": "C:\\Windows\\System32\\cmd.exe",
"label": "cmd"
},
{
"shell": "C:\\Windows\\System32\\bash.exe",
"label": "WSL Bash"
}
]
When launching the Shell Launcher task it only shows the PowerShell, PowerShell Core and cmd shells.
Why does the WSL Bash option does not show up?
/Stefan
My guess is that this access check is failing:
https://github.com/Tyriar/vscode-shell-launcher/blob/27d07379f9e5fdca212fe40ac804f6d7432892a8/src/extension.ts#L66
Maybe wsl.exe
will work? This might depend on the version of Windows 10 you're running as I believe in older versions bash.exe was some special executable that I couldn't find on disk.
I tried wsl, but that failed too.
Output while debugging.
Stefan
@stefanstranger what version of Windows 10 are you on?
@Tyriar: I had the same issue as stefanstranger.
I was able to solve it by changing the search-path from "C:\\Windows\\system32\\wsl.exe"
to "C:\\Windows\\Sysnative\\wsl.exe"
.
Note that it points to wsl.exe, but the same problem/solution is valid for bash.exe.
Note that I now run VSCode with the User installation.
My W10 (x64) Version: 10.0.16299 Build 16299
@Heer-Boaz you're probably using the 32-bit version of VS Code on your 64-bit machine if sysnative works, you should switch to the 64-bit version. Merging this into https://github.com/Tyriar/vscode-shell-launcher/issues/28
Actually I think @stefanstranger probably is seeing a different issue since cmd worked.
Actually I think @stefanstranger probably is seeing a different issue since cmd worked.
Because 32bit vscode is using System32 cmd or SysWOW64 folder( contains 32bit dlls) on 64bit OS. I assume WSL bash is only 64bit application, so it's not there. If "Sysnative" virtual folder will be specified in path then redirection to real System32 folder of 64bit dlls will happen.