cmd/go: env should populate GOBIN as effective install target directory for main packages #28337
Labels
FeatureRequest
FrozenDueToAge
GoCommand
cmd/go
NeedsDecision
Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?What did you do?
There is currently no simple way to see the directory
go install
will use as the target for this main package.go list
gives us the final target:go env
simply gives us the current environment values ofGOBIN
andGOPATH
:If we then set
GOBIN
:I'd like to propose that
go env GOBIN
be the derived directory thatgo install
will use, following the precedence logic ofGOBIN
,GOPATH
andos.UserHomeDir()
:What did you expect to see?
The output of
go env
giving the target directory forgo install
What did you see instead?
No output of
go env
giving the target directory forgo install
The text was updated successfully, but these errors were encountered: