Skip to content

Spaces in windows PATH break when appendWindowsPath is true #13794

@cooperoptigrid

Description

@cooperoptigrid

Windows Version

Microsoft Windows [Version 10.0.26200.7171]

WSL Version

2.5.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

6.6.87.2-1

Distro Version

Ubuntu 24.04

Other Software

VS Code - 1.106.2
Cursor - 2.1.25

Repro Steps

>>> code .
command code not found
>>> cursor .
command cursor not found

Expected Behavior

>>> code .  # opens VS Code
>>> cursor .  # opens Cursor

Actual Behavior

>>> code .
command code not found
>>> cursor .
command cursor not found

Diagnostic Logs

>>> echo $PATH
# ... bunch of normal linux paths like /usr/bin]
# broken Windows Paths, note ":" where spaces should be
/mnt/c/Program:Files/dotnet/:Files/Git/cmd:Files/Amazon/AWSCLIV2/:/Docker/host/bin:Files/cursor/resources/app/bin:Files/PowerShell/7/:/mnt/c/Users/Cooper/.local/bin:/mnt/c/Users/Cooper/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Cooper/AppData/Local/Programs/Microsoft:VS:Code/bin:
# bunch of other stufff

A workaround is for me to manually add the correct paths to my .bashrc

# temporary, hopefully. not sure why this suddenly stopped working...
export PATH="$PATH:/mnt/c/Users/Cooper/AppData/Local/Programs/Microsoft VS Code/bin"
export PATH="$PATH:/mnt/c/Program Files/cursor/resources/app/bin"

This made it work!

This was never a problem until I restarted my device recently (and presumbaly some updates were applied).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions