Not planned
Description
go env GOBIN
would be helpful to tools beyond the Go toolchain to determine where go install
will install a binary.
However, up to go 1.22.4, the go install
directory is not explicitely exposed like GOPATH
is. Instead GOBIN
is exposed with an empty value.
Go version
go version go1.22.4 darwin/arm64
Output of go env
in your module/workspace:
GOBIN=''
GOPATH='/Users/gopher/go'
What did you do?
$ go help environment | sed -n '/GOBIN/{N;p;}'
GOBIN
The directory where 'go install' will install a command.
$ env | grep GOBIN
$ cat "$(go env GOENV)"
$ go env GOBIN
$ go env | grep GOBIN
GOBIN=''
What did you see happen?
See above
What did you expect to see?
$ go env GOPATH
/Users/gopher/go
$ env | grep GOBIN
$ cat "$(go env GOENV)"
$ go env GOBIN
/Users/gopher/go/bin
$ go env | grep GOBIN
GOBIN='/Users/gopher/go/bin'
Activity
gabyhelp commentedon Jun 21, 2024
Similar Issues
(Emoji vote if this was helpful or unhelpful; more detailed feedback welcome in this discussion.)
dolmen commentedon Jun 21, 2024
Duplicate of #34522, #28337, #50714.
See @rsc comment: #23439 (comment)
dolmen commentedon Jun 21, 2024
Apparently the blocking issue is #23439, so I'm closing.
dolmen commentedon Jun 21, 2024
Reopening because #23439 seems to be settled if we look at the documentation.
seankhliao commentedon Jun 21, 2024
I don't think we need a separate issue, this can be done as #23439