moovweb / gvm

Go Version Manager
http://github.com/moovweb/gvm
MIT License
10.32k stars 538 forks source link

`go install` fails if GO111MODULE=on #318

Open quchao opened 5 years ago

quchao commented 5 years ago

Hi there, If GO111MODULE=on is set and a Go 1.11 & later is being used, the installations will fail with errors below:

go: cannot determine module path for source directory /Users/xxx/.gvm/gos/go1.xx.x (outside GOPATH, no import comments)

Although one can avoid that by disabling it temporarily, like:

GO111MODULE=auto gvm install go1.xx.x

Would it be a nice idea to solve it by the gvm install script?

nezorflame commented 5 years ago

@quchao I think it's unnecessary since Go 1.12 now allows to use go get without being inside the module directory. This problem is specific to Go 1.11, and since module support is still experimental, I think it should be left as is.