Skip to content

shellPath.ts returns undefined for Windows even when connected to WSL #9737

Closed

Description

@shanevcantwell

Description

getEnvPathFromUserShell() in core/util/shellPath.ts returns undefined for all Windows platforms, even when the extension is connected to a WSL remote where shell path detection would work.

Code

if (process.platform === "win32") {
  return undefined;  // Always returns undefined on Windows
}

Impact

PATH environment may be incorrect when Windows host connects to WSL, potentially causing tool resolution failures.

Suggested Fix

Check ideInfo.remoteName === "wsl" and attempt shell path detection for the remote environment.

Related

Activity

  1. sestinj commented on Jan 21, 2026

    @sestinj
    Contributor

    Related issues involving shell path / WSL detection:

  2. added
    ide:vscode
    javascript
    kind:bug
    os:windows
    on Jan 21, 2026
  3. RomneyDa commented on Jan 26, 2026

    @RomneyDa
    Contributor

    @shanevcantwell was this fixed by one of these?
    #9810
    #9740

  4. added a commit that references this issue on Jan 27, 2026
    939b44b
  5. shanevcantwell commented on Jan 27, 2026

    @shanevcantwell
    ContributorAuthor

    No, but #9934 will take care of it. The state issue I detailed here, though, may make any further issues related to detecting wsl require knowing if the reporter has had multiple windows crossing between Windows and wsl a necessary question for debugging:
    #9735 (comment)

  6. added a commit that references this issue on Jan 31, 2026
    895632c
  7. sestinj commented on Feb 3, 2026

    @sestinj
    Contributor

    🎉 This issue has been resolved in version 1.41.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ide:vscodejavascriptkind:bugos:windowsreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions