moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
10.32k stars 538 forks source link

"Unrecognized command line argument" when use "sudo -E" in Max OS X #177

Open nonkr opened 8 years ago

nonkr commented 8 years ago

qq20160113-1 2x

tscs37 commented 8 years ago

I would like to add to this that the same error occurs under Ubuntu 15.

Calling gvm from anything but the command line seems to make the use keyword unusable.

Example code:

$bash -c "gvm use go1.5.3"
ERROR: Unrecognized command line argument. 'use'
$gvm use go1.5.3
Now using version go1.5.3

Workaround: Make a link from .gvm/scripts/env/use to .gvm/script/use

ln -s .gvm/scripts/env/use .gvm/script/use

gogames commented 8 years ago

@eyecikjou567 it does not work for me on centos 6.5