Extension not working with WSL enabled
See original GitHub issueError:
Got told to use WSL, but cannot find installation. Bailing out.
Looking at this: https://github.com/timonwong/vscode-shellcheck/blob/77b03afd1d8007b48eaa6351e3f9cc3b0c2be544/src/utils/wslSupport.ts#L23-L24
Because of this: https://github.com/timonwong/vscode-shellcheck/blob/77b03afd1d8007b48eaa6351e3f9cc3b0c2be544/src/linter.ts#L247-L249
I checked if there is a bash.exe
in C:\Windows\System32
. It is there and works, as it should.
The difference is, that the actual directory where the actual WSL is installed, is in a custom place, not in the default directory within AppData\xxx\
. However, since it is asking for bash.exe
which is at the right place and confirmed to work, I don’t understand why the extension cannot find the WSL installation, which is, again, working perfectly fine with all other extensions for VS Code, installed in WSL.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9
I ended up getting a new computer, and it just worked first time when I installed shellcheck extension in VSCode (in a project I was working on in WSL). I don’t have access to the old computer anymore unfortunately so cannot reproduce the error anymore.
@vbrozik It might not fix your exact problem, but did you notice that now the extension has the
shellcheck
binaries bundled in it? For both Windows and Linux. To use it, unset the Shellcheck: Executable Path and disable the Shellcheck: Use WSL.