You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executables are installed in the directory named by the GOBIN environment variable, which defaults to $GOPATH/bin or $HOME/go/bin if the GOPATH environment variable is not set.
The point is:
Go compiles an app to a static binary which is not depends on current Go package.
The binaries installed by go install are supposed to be available in user's PATH until user will manually remove them. They shouldn't disappear from PATH just because Mise switch to a different go version or even uninstalls go.
Users usually expect to install these binaries into $GOPATH/bin (because they usually do not set GOBIN, but may set GOPATH).
User may execute go install github.com/some/[email protected] at any moment in any directory and expects to have thing binary available in his PATH. Installed thing often is not related to current working directory/project, it's more like random mise i or mise exec [email protected] -- thing.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Current behaviour:
I think it makes more sense to change this and do not set GOBIN, to have this result:
Documentation about GOBIN:
More details:
The point is:
go install
are supposed to be available in user's PATH until user will manually remove them. They shouldn't disappear from PATH just because Mise switch to a different go version or even uninstalls go.$GOPATH/bin
(because they usually do not setGOBIN
, but may setGOPATH
).go install github.com/some/[email protected]
at any moment in any directory and expects to havething
binary available in his PATH. Installed thing often is not related to current working directory/project, it's more like randommise i
ormise exec [email protected] -- thing
.Beta Was this translation helpful? Give feedback.
All reactions