gvm icon indicating copy to clipboard operation
gvm copied to clipboard

GVM does not function correctly in WSL

Open orhpeus opened this issue 2 years ago • 7 comments

I am using gvm under WSL2. When the following script was added to the .bashrc, [[ -s "/home/m2m/.gvm/scripts/gvm" ]] && source "/home/m2m/.gvm/scripts/gvm"

I noticed that VS Code did not start properly. After looking at $PATH, it is found that the spaces in the path become colons. As shown in the following figure:

When GVM disabled: image

When GVM enabled: image

orhpeus avatar Sep 11 '23 01:09 orhpeus

I fix it in this pr: https://github.com/moovweb/gvm/pull/443

andot avatar Sep 13 '23 02:09 andot

Also facing this issue over here. Tried your fix @andot but still facing the same problem.

bamaas avatar Sep 19 '23 12:09 bamaas

I temporarily used the following method to disable the resolution of Windows paths.

  1. Create a new /etc/wsl.conf configuration file under wsl and edit the following:

[interop] appendWindowsPath=false

orhpeus avatar Sep 22 '23 02:09 orhpeus

@andot @orhpeus @bamaas kindly try this out. I am using this goenv: https://github.com/ankitcharolia/goenv.

ankitcharolia avatar Oct 24 '23 05:10 ankitcharolia

I am facing the same issue on an ARM MAC with zsh.

k0b3rIT avatar Nov 28 '23 15:11 k0b3rIT

@andot 's solution solves the problem THX!

k0b3rIT avatar Nov 28 '23 15:11 k0b3rIT

For anyone who comes here because of this problem: @andot PR has been there since September 2023, and I don't think the maintainer (@moovops) will merge the PR in the near time.

You can always rollback to the point when the defect has not been introduced, or you can add this at the end of your ~/.zshrc or ~/.bashrc

export PATH=$(echo $PATH | sed 's/:\([^/]\)/ \1/g')

This workaround simply looks for any colon character that is not followed by a slash and replaces it with a space.

goFrendiAsgard avatar Jan 07 '24 00:01 goFrendiAsgard