Problem
The shared Zsh profile prepends $HOME/.local/bin but does not include Go's executable installation directory. With an empty GOBIN, go install writes binaries to the first GOPATH entry plus /bin (commonly $HOME/go/bin). The installation succeeds, but the shell can keep resolving an older duplicate from $HOME/.local/bin or fail to find the newly installed binary.
Reproduction
- Use the profile with
go env GOBIN empty and the default GOPATH.
- Install a CLI normally, for example:
go install github.com/gentleman-programming/gentle-ai/v2/cmd/gentle-ai@v2.4.0-rc.1
- Run
command -v gentle-ai and gentle-ai version.
Expected behavior
The standard go install ...@version command should make the newly installed binary discoverable without requiring a per-command GOBIN override. The Go binary directory should take precedence over stale duplicates in generic user-local directories.
Current behavior
go install writes the requested version under the default Go binary directory, while the profile prioritizes $HOME/.local/bin; the active command can therefore remain on an older version.
Requested outcome
- Resolve the effective Go executable directory from non-empty
GOBIN, otherwise from the first GOPATH entry plus /bin.
- Add it to the shared Zsh
PATH with deterministic precedence.
- Avoid duplicate
PATH entries and preserve compatibility when Go is unavailable.
- Add a shell smoke check covering the default
GOPATH case.
Environment
- Zsh profile managed by this repository
- Go using its default
GOPATH-based binary destination
mise activation also participates in PATH ordering
Problem
The shared Zsh profile prepends
$HOME/.local/binbut does not include Go's executable installation directory. With an emptyGOBIN,go installwrites binaries to the firstGOPATHentry plus/bin(commonly$HOME/go/bin). The installation succeeds, but the shell can keep resolving an older duplicate from$HOME/.local/binor fail to find the newly installed binary.Reproduction
go env GOBINempty and the defaultGOPATH.command -v gentle-aiandgentle-ai version.Expected behavior
The standard
go install ...@versioncommand should make the newly installed binary discoverable without requiring a per-commandGOBINoverride. The Go binary directory should take precedence over stale duplicates in generic user-local directories.Current behavior
go installwrites the requested version under the default Go binary directory, while the profile prioritizes$HOME/.local/bin; the active command can therefore remain on an older version.Requested outcome
GOBIN, otherwise from the firstGOPATHentry plus/bin.PATHwith deterministic precedence.PATHentries and preserve compatibility when Go is unavailable.GOPATHcase.Environment
GOPATH-based binary destinationmiseactivation also participates inPATHordering