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

proposal: cmd/go: install: add environment variable setup for .zshrc #66978

H0llyW00dzZ opened this issue Apr 22, 2024 · 2 comments


Copy link

Proposal Details

By default, the Go package for Darwin (macOS) AMD64, which can be downloaded from, does not configure environment variables automatically. Therefore, users must manually set up their environment after installation, especially when installing Go tools using go install. To set up your environment:

  1. Open your terminal.

  2. Edit the .zshrc file in your text editor. For instance, using nano:

    nano ~/.zshrc
  3. Append the following line to the file:

    export PATH=$PATH:$(go env GOPATH)/bin
  4. Save and exit the file. In nano, press Ctrl + X, then press Y to confirm, and Enter to save the changes.

  5. Apply the changes to your current terminal session by executing:

    source ~/.zshrc

It would be more convenient if this configuration were included automatically during the installation process, eliminating the need for manual setup.

@gopherbot gopherbot added this to the Proposal milestone Apr 22, 2024
Copy link

Copy link

Duplicate of #39531

@seankhliao seankhliao marked this as a duplicate of #39531 Apr 22, 2024
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Apr 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet

No branches or pull requests

3 participants