]> Cypherpunks repositories - gostls13.git/commit
cmd/go: fix GOTOOLCHAIN parsing for +auto
authorRuss Cox <rsc@golang.org>
Tue, 11 Jul 2023 19:15:51 +0000 (15:15 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 12 Jul 2023 18:25:28 +0000 (18:25 +0000)
commit87350393e684f1eb10f28b6b1d712a6d60093f49
treebb6f94134c35a9717c19702ec3a48f538c77bd0c
parent230e54914209c134dbb6b09ffb143d7396c079a7
cmd/go: fix GOTOOLCHAIN parsing for +auto

The call from toolchain.Select to gover.FromToolchain was passing the
wrong argument but this was masked by gover.IsValid being a little bit
too lax.

Fix and test IsValid, which then breaks the existing gotoolchain_local
test, and then fix toolchain.Select to fix the test.

Fixes #61068.

Change-Id: I505ceb227457d6a51bd5e47f009b2fb1010c0d1f
Reviewed-on: https://go-review.googlesource.com/c/go/+/508820
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Russ Cox <rsc@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/cmd/go/internal/gover/gover.go
src/cmd/go/internal/gover/gover_test.go
src/cmd/go/internal/gover/toolchain.go
src/cmd/go/internal/toolchain/select.go
src/cmd/go/testdata/script/gotoolchain_local.txt