question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Extension not working with WSL enabled

See original GitHub issue

Error:

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:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
gostegacommented, May 26, 2021

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.

1reaction
felipecrscommented, Sep 24, 2020

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Work in Windows Subsystem for Linux with Visual Studio Code
This tutorial walks you through enabling Windows Subsystem for Linux (WSL) and running Visual Studio Code in WSL using the WSL extension.
Read more >
Git extension disabled in VS code with WSL - Stack Overflow
Open the extension panel (Ctrl + Shift + X) · You should be able to see the section "WSL: UBUNTU: INSTALLED" · Click...
Read more >
Some extensions are disabled on WSL Remote and can't be ...
I've installed Ruby and VSCode Ruby extension on my local (windows) vscode, but when i run VSCode on remote VSCode Ruby extension is...
Read more >
Get started using VS Code with WSL - Microsoft Learn
Visual Studio Code, along with the WSL extension, enables you to use WSL as your full-time development environment directly from VS Code.
Read more >
Working with Visual Studio Code on Ubuntu on WSL2
The easiest way to access your Ubuntu development environment in WSL is using Visual Studio Code via the built in Remote extension. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found