Spaces in windows PATH break when appendWindowsPath is true
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
### Windows Version
Microsoft Windows [Version 10.0.26200.7171]
### WSL Version
2.5.9.0
### Are you using WSL 1 or WSL 2?
- [x] 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
```sh
>>> code .
command code not found
>>> cursor .
command cursor not found
```
### Expected Behavior
```sh
>>> code . # opens VS Code
>>> cursor . # opens Cursor
```
### Actual Behavior
```sh
>>> code .
command code not found
>>> cursor .
command cursor not found
```
### Diagnostic Logs
```sh
>>> 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`
```sh
# 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).
Contributor guide
Assessment
This issue has not been assessed yet.