glide
glide copied to clipboard
error getting version:exit status 2
hi, when i use glide,no matter what cmd i use,it returns such error: Error getting version: exit status 2 why?what is it means? thanks
gopath error
I hit this too - I wonder if it wants to be revisited.
How To Reproduce
$. export GOPATH=.
$. glide get github.com/gorilla/mux
What Is Expected
A normal go get
will give a better error in this situation, specifically (under 1.7.1) gives a more helpful error like this:
go get github.com/gorilla/mux
go: GOPATH entry is relative; must be absolute path: ".".
Run 'go help gopath' for usage.
Assuming that this is the same underlying problem (and I think it is, as if I use an absolute path this goes away) then it might be a good idea to send back a better error.
Fair, yes, we should probably provide a better error message
The same problem can occur if your GOROOT is wrong which was my problem. Executing the command mentioned above will expose the problem so you then can fix it:
go get github.com/gorilla/mux
Same thing if GOPATH ending with ;
on Windows :
> set GOPATH=C:\dev;
> glide install -v
[ERROR] Error getting version: exit status 2.
gopath might be a cause either