glide icon indicating copy to clipboard operation
glide copied to clipboard

error getting version:exit status 2

Open gitwangjian opened this issue 8 years ago • 6 comments

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

gitwangjian avatar Jun 21 '16 03:06 gitwangjian

gopath error

gitwangjian avatar Jun 21 '16 04:06 gitwangjian

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.

snewman avatar Nov 09 '16 17:11 snewman

Fair, yes, we should probably provide a better error message

sdboyer avatar Dec 07 '16 19:12 sdboyer

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

matt3o avatar Mar 14 '17 10:03 matt3o

Same thing if GOPATH ending with ; on Windows :

> set GOPATH=C:\dev;
> glide install -v
[ERROR] Error getting version: exit status 2.

crazy-max avatar Aug 06 '17 22:08 crazy-max

gopath might be a cause either

Synaxis avatar Jan 26 '19 07:01 Synaxis