cmd/go: using cmdFlags instead run flags

Change-Id: Ib09fb88c610390a77c289200e0359216ea2cf397
GitHub-Last-Rev: ca262b213f
GitHub-Pull-Request: golang/go#78757
Reviewed-on: https://go-review.googlesource.com/c/go/+/767103
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Sean Liao <sean@liao.dev>
Auto-Submit: Sean Liao <sean@liao.dev>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
This commit is contained in:
Weixie Cui 2026-04-15 13:05:59 +00:00 committed by Gopher Robot
parent 543703d352
commit 82885449f7

View file

@ -626,7 +626,7 @@ func maybeSwitchForGoInstallVersion(ld *modload.Loader, minVers string) {
continue
}
f := run.CmdRun.Flag.Lookup(a)
f := cmdFlags.Lookup(a)
if f == nil {
// We don't know whether this flag is a boolean.
if os.Args[1] == "run" {