commit 29ec66a11cc2ca366ef4104cfa09fbd880452543 parent 942a336a5fec81c14e8bd280c10924d0d6e9b51c Author: Alex Balgavy <a.balgavy@gmail.com> Date: Tue, 8 Jan 2019 15:21:35 +0100 Go environment variables Former-commit-id: db0fbb8d71adee79511ff1659c1a7e432f3a8709 Diffstat:
M | shell/commonprofile | | | 7 | +++++++ |
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/shell/commonprofile b/shell/commonprofile @@ -16,6 +16,13 @@ if [[ $PATH != *"/Users/alex/.bin"* ]]; then export PATH=$HOME/.bin:$PATH fi +# Golang +if command -v go &> /dev/null; then + if [[ $PATH != *"$(go env GOPATH)"* ]]; then + export PATH=$PATH:$(go env GOPATH)/bin + fi + export GOPATH=$(go env GOPATH) +fi # Set a variable for my confidr export CONF_DIR="$HOME/.dotfiles"