]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/go: print hint when 'go install' run without version outside module
authorJay Conrod <jayconrod@google.com>
Fri, 11 Dec 2020 21:45:39 +0000 (16:45 -0500)
committerJay Conrod <jayconrod@google.com>
Mon, 14 Dec 2020 15:40:56 +0000 (15:40 +0000)
commit64d8846aaef4b64d2649917581069c0ec30ca561
tree41ab69260465f5a2871ea532307b40402d660411
parent451b6b38fd3f87957c39fdb6572740f74ea27931
cmd/go: print hint when 'go install' run without version outside module

If 'go install' is invoked in module mode outside a module with a
package that could only be loaded from a module, it will now suggest
running 'go install pkg@latest'.

'go install' will still work outside a module on packages in std and
cmd, as well as .go files specified on the command line.

Fixes #42638

Change-Id: Ib0963935f028b7656178bc04a279b1114de35fbb
Reviewed-on: https://go-review.googlesource.com/c/go/+/277355
Run-TryBot: Jay Conrod <jayconrod@google.com>
Trust: Jay Conrod <jayconrod@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
src/cmd/go/internal/work/build.go
src/cmd/go/testdata/script/mod_outside.txt