cmd/go: "go bug" in build on different branch reports version different than "go version" #43981
Labels
FrozenDueToAge
GoCommand
cmd/go
help wanted
NeedsFix
The path to resolution is known, but the work has not been done.
Milestone
What version of Go are you using (
go version
)?(Note that the below is wrong; see the rest of the bug details. 🙂)
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I checked out
dev.regabi
, then did a./make.bash
. Then I rango bug
from my checkout'sbin
like~/zikaeroh/go/bin/go bug
.What did you expect to see?
Open a browser with the commit from the branch, and the version filled in matches
go version
.What did you see instead?
The version is of the wrong build (see the version at the top of this issue; which was generated with
go bug
). Runninggo version
the same way asgo bug
reports:Looking at the source for
go bug
, it seems to just rungo version
from$PATH
, instead of reexecing itself or ensuring$GOROOT/bin
is in$PATH
(as doesgo env
, apparently). I can see thatGOROOT/bin/go version
is printed as an environment variable, but it surprises me for the main version listed in the bug template to be of a different Go. (Maybe I'm the only one running ago
binary directly and relying on implicit$GOROOT
?)The text was updated successfully, but these errors were encountered: