Giter Site home page Giter Site logo

Comments (8)

caioreix avatar caioreix commented on September 23, 2024 5

@zalom i found a solution, just the space from this path ~/.gvm/scripts/function/munge_path line 51.
Something like this
IFS=':' path_in_ary=( $(printf "%s" "${path_in}") ) IFS="$defaultIFS"

from gvm.

theunrepentantgeek avatar theunrepentantgeek commented on September 23, 2024 4

I'm seeing the same behaviour, but in this case it's mangling the path for VS Code:

In GVM_PATH_BACKUP:
/mnt/c/Users/bearps/AppData/Local/Programs/Microsoft VS Code/bin

In PATH:
/mnt/c/Users/bearps/AppData/Local/Programs/Microsoft:VS:Code/bin

The version I'm running:

$ gvm version
Go Version Manager v1.0.22 installed at /home/bevan/.gvm

from gvm.

Ivan-Parushev avatar Ivan-Parushev commented on September 23, 2024 1

This works for me. Thanks @caioreix !

Is this a typo or for some reason it is meant to be ': '? If its just a mistake maybe somebody can make a quick PR and fix it permanently?

from gvm.

caioreix avatar caioreix commented on September 23, 2024

Same problem here, gvm is replacing spaces with :

from gvm.

zalom avatar zalom commented on September 23, 2024

Ditto. I spent a day debugging to see why code does not work when called from the terminal on WSL.
The conclusion is the same, colon (:) replaces spaces.

Also, it replaces cd as well.

(before gvm scripts mod)

type cd
cd is a shell builtin

(after gvm scripts mod)

type cd
cd is a shell function from /home/zlatko/.gvm/scripts/env/cd

from gvm.

zalom avatar zalom commented on September 23, 2024

@zalom i found a solution, just the space from this path ~/.gvm/scripts/function/munge_path line 51.
Something like this
IFS=':' path_in_ary=( $(printf "%s" "${path_in}") ) IFS="$defaultIFS"

Thanks man!

from gvm.

kaxxa123 avatar kaxxa123 commented on September 23, 2024

Installed gvm today and had the same problem.
Windows 10
WSL2 (Ubuntu 22.04)
Go Version Manager v1.0.22

Removing the extra space in line 51 of ~/.gvm/scripts/function/munge_path does not work for me.

Also further to what was already reported (replacement of spaces with a colon), Looking closely at the changes made to the PATH. I can see that many of my paths were simply chopped off. Here are some examples

FROM:
/mnt/c/Program Files/Eclipse Adoptium/jdk-8.0.382.5-hotspot/bin
/mnt/c/Program Files/nodejs

TO:
Adoptium/jdk-8.0.382.5-hotspot/bin
Files/nodejs

So the problem is not limited with replacing spaces with colon. Some paths simply get chopped off at a space.

from gvm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.