gvm: ERROR: Unrecognized command line argument: 'use'
After previously having successfully run gvm use go1.6
:
$ gvm install go1.5.3
Installing go1.5.3...
* Compiling...
$ gvm use go1.5.3
ERROR: Unrecognized command line argument: 'use'
$ gvm install go1.4.3
Installing go1.4.3...
* Compiling...
$ gvm use go1.4.3
ERROR: Unrecognized command line argument: 'use'
$ gvm version
Go Version Manager v1.0.22 installed at /Users/ryan/.gvm
About this issue
- Original URL
- State: open
- Created 8 years ago
- Reactions: 7
- Comments: 19
Commits related to this issue
- Workaround https://github.com/moovweb/gvm/issues/188 — committed to v1v/hey-apm by v1v 5 years ago
restart your terminal or
I’m also struggling with the same problem when trying to use
gvm use
in the shell script. Workaround which works for me is to source it in the script itself.Are you guys installed ‘zsh’ version but using in ‘bash’ or instead?
Using Ubuntu 14.04 and default terminal.
on executing
gvm use go1.4
on terminal, it works.But fails with the above error, if the command is used in a makefile or shell script.
Try this out, I just added it to my config with the same issues and seems to be working now.
FILE: ~/.gvm/scripts/gvm-default
. "$GVM_ROOT/scripts/env/use"
This is still happening! Doesn’t seem to work in a Makefile even after sourcing gvm.
Encountering it on
v1.0.22
A temporary fix would be to
cp ~/.gvm/scripts/env/use ~/.gvm/scripts
and give it execution rights.This fixed my Jenkins build, but having to do it manually looks weird.
Before that I also tried to use a local zsh by adding #!/usr/bin/zsh to my shell script, but I’m still getting the “Unrecognized command line argument: ‘use’” message.
it works for me