Skip to content

WSL PATH inheritance from Windows #2196

@MichaelTong

Description

@MichaelTong

I was using VSCode on Windows, and I add my own script to start code.exe by invoking cmd.exe /C Code.exe.
Suddenly, I start to notice that $PATH in WSL in actually inherited from Windows, while the format is somehow wrong: For [space] in the path, it is just like Program[space]Files/... instead of Program\[space]Files/..., and this prevents me export additional path to $PATH.

  • Your Windows build number: 10.0.15063

  • What you're doing and what's happening: In a script, export PATH=$PATH:/mnt/c/Windows/System32

  • What's wrong / what should be happening instead: export error because there are [space] in original PATH

  • Strace of the failing command, if applicable: (If <cmd> is failing, then run strace -o strace.txt -ff <cmd>, and post the strace.txt output here)

See our contributing instructions for assistance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions