Glide: error getting version:exit status 2

Created on 21 Jun 2016  路  6Comments  路  Source: Masterminds/glide

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

Most helpful comment

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.

All 6 comments

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bestofmukul picture bestofmukul  路  5Comments

hlltarakci picture hlltarakci  路  4Comments

gm42 picture gm42  路  6Comments

martinkunc picture martinkunc  路  3Comments

treeder picture treeder  路  4Comments