PATH environment variable #5099
-
Microsoft Windows [Version 10.0.18363.778] This was the command: The was the error: How to solve this? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
What if you make the touch command "secure" by providing the full path for it?
That way, a relative directory in your PATH won't accidentally pick it up. |
Beta Was this translation helpful? Give feedback.
-
Looks like the relative path here is " Possible remedies are:
The (3) option will mean you'll lose your windows path components, but you can fix that up with (2). Or do (1). |
Beta Was this translation helpful? Give feedback.
-
Non modified .bashrc here, temporarily removing windows path before make e.g:"export PATH=":!removewindowspaths!" fixed it. (substitute with the result of echo $PATH) |
Beta Was this translation helpful? Give feedback.
-
Is it a bug in the commands (e.g. find), and not really WSL? Or just a bad practice to have spaces in paths for PATH env variable?
|
Beta Was this translation helpful? Give feedback.
Looks like the relative path here is "
Files/WindowsApps/CanonicalGroupLimited....
" when "/mnt/c/Program Files/WindowsApps....
" is intended. Somehow$PATH
got borked by something beforefind
was ever run. That something is almost always in (or called from) a customized.bashrc
.Possible remedies are:
$PATH
containing spaces..bashrc
setting$PATH
explicitly (with or without Windows path components).appendWindowsPath=false
in/etc/wsl.conf
so there aren’t spaces to mangle.The (3) option will mean you'll lose your windows path components, but you can fix that up with (2). Or do (1).