Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optionally add GOPATH/bin || GOBIN to PATH env variable #203

Open
Mzack9999 opened this issue Oct 6, 2023 · 1 comment · Fixed by #234
Open

Optionally add GOPATH/bin || GOBIN to PATH env variable #203

Mzack9999 opened this issue Oct 6, 2023 · 1 comment · Fixed by #234
Assignees
Labels
Type: Enhancement Most issues will probably ask for additions or changes.

Comments

@Mzack9999
Copy link
Member

Mzack9999 commented Oct 6, 2023

Please describe your feature request:

The $GOPATH/bin path not present in $PATH environment variable and the subsequent binary not found error is a common scenario for everyone installing any go tool. We should consider adding it as last one along with pdtm one, so that the final PATH env variable looks like this:

export PATH=$PATH:$HOME/.pdtm/bin:$GOPATH/bin

Notes:

  • Maybe the behavior should be optional, but it would automatically make life easier for countless people just starting with go and not familiar with dozen of shells configuration files
  • The GOPATH might be scoped only to the go binary, so it should be retrieved via go env GOPATH output
  • If GOBIN is defined, it has priority over GOPATH/bin
@Mzack9999 Mzack9999 added the Type: Enhancement Most issues will probably ask for additions or changes. label Oct 6, 2023
@Mzack9999 Mzack9999 changed the title Optionally add GOPATH/bin to PATH env variable Optionally add GOPATH/bin || GOBIN to PATH env variable Oct 6, 2023
@dogancanbakir dogancanbakir self-assigned this Oct 9, 2023
@gedw99
Copy link

gedw99 commented Dec 23, 2023

This is a really good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Most issues will probably ask for additions or changes.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants