]> Cypherpunks repositories - gostls13.git/commit
cmd/go: download newer toolchain if needed during go install m@v
authorRuss Cox <rsc@golang.org>
Mon, 22 May 2023 15:17:31 +0000 (11:17 -0400)
committerGopher Robot <gobot@golang.org>
Tue, 23 May 2023 16:36:17 +0000 (16:36 +0000)
commitd9f7efed7df66494ad5137b108a37ee2e0853d52
treef8246ba1450611ab245611f91f36590286d1ad92
parenteb9a157d0f6c71877ff6473072d7a8f1c34f4afc
cmd/go: download newer toolchain if needed during go install m@v

go install m@v and go run m@v are the only commands
that ignore the local go.mod. As such they need to use a
different signal to find the Go version, namely the m@v go.mod.
Because there is no way to predict that Go version (no equivalent
of "go version" for interrogating the local go.mod), if we do switch
toolchains we always print about it.

For #57001.

Change-Id: I981a0b8fa61992b353589355ba72a3b9d55914e2
Reviewed-on: https://go-review.googlesource.com/c/go/+/497079
Auto-Submit: Russ Cox <rsc@golang.org>
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/gotoolchain.go
src/cmd/go/testdata/mod/rsc.io_fortune_v0.0.1.txt [new file with mode: 0644]
src/cmd/go/testdata/script/gotoolchain.txt
src/cmd/go/testdata/script/install_dep_version.txt