Glide should use the default of $HOME/go if not set.
I wonder if we could use go env GOPATH if the GOPATH env var is empty. That may give us the right result.
I am using go env in Makefiles for similar reasons, and can confirm that it gives the correct results under 1.8 when $GOPATH is not set :)
There's a PR for this on #798
$ glide install
[ERROR] $GOPATH is not set.
$ glide -v
glide version v0.12.3
go version go1.8.3 linux/amd64
Ubuntu 14.04.5 LTS
Most helpful comment