Closed pchang388 closed 1 year ago
We have an awkward problem: we do not, in fact, attempt to append to your Ubuntu $PATH
. We just add it to the Windows-side %PATH%
(yes, the directory holding the Linux binaries) and hope that WSL will fix it up for us.
https://github.com/rancher-sandbox/rancher-desktop/blob/v1.9.1/build/wix/main.wxs#L130-L132
We do have some WSL integration stuff, but that runs processes and makes symlinks for docker plugins, but those shouldn't be affecting $PATH
.
Also, we do have some $PATH
munging on Linux/macOS, but that code shouldn't be running on Windows/WSL. (If we do run them, that would probably be a bug…)
Would you mind double checking the things in your .bashrc
(maybe dumping $PATH
as it runs) to ensure that the issue doesn't come from there? I realize that's probably not the answer you're looking for, but it's currently my best guess so far :)
No worries and thanks for your response, I did take another look and I found the issue:
I found the issue only occurs when I install GVM (golang version manager) on Ubuntu WSL2, it seems to change the PATH to include those colons and also does something very weird, I didn't save the log message unfortunately but can see this when I check the cd
command
Normal response
$ type cd
cd is a shell builtin
When GVM installed:
cd is a function...
... some code for GVM specific operations ...
Essentially gvm at least in current latest version rewrites the cd builtin command with it's own for some reason which is not expected imo and makes it unusable. It shouldn't be doing that at all
Also I agree, I didn't think this was rancher doing it specifically since it was also happening for VS code, was just hoping someone had seen it before with a similar set up and knew how to resolve the issue
Think we can close this issue for now, hopefully it helps others also trying to get GVM to work, for now I will have to avoid it until it's resolved
There seems to be multiple projects named gvm
for managing golang versions, so it's unclear which one you're using :) If it's the moovweb
one, scripts/function/munge_path#51
looks suspicious, but I don't seen an issue in their repository about spaces in $PATH
.
Actual Behavior
Rancher PATH appending in WSL2 Ubuntu 22.04 LTS is showing improper values. From a working machine I had with a similar setup, path has spaces and references the llinux bin, but when trying to install and configure on WSL2 on my corporate laptop, I see this
We can see that spaces are replaced with ":" colons and the linux/bin directory appears to be partial instead of the full path. This causes me to not be able to use docker, helm, etc. provided by Rancher Desktop. I also see a strange issue that may be related when trying to go into those directories
Steps to Reproduce
Result
Expected Behavior
Two issues:
Additional Information
Rancher Desktop Version
1.9.1
Rancher Desktop K8s Version
1.27.4
Which container engine are you using?
moby (docker cli)
What operating system are you using?
Windows
Operating System / Build Version
Microsoft Windows 11 Enterprise [10.0.22000 Build 22000]
What CPU architecture are you using?
x64
Linux only: what package format did you use to install Rancher Desktop?
None
Windows User Only
Yes VPN for corporate access, GlobalProtect VPN