From 1617781d4927c2325074f8606f8eeef972477342 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kaan=20Barmore-Gen=C3=A7?= Date: Sun, 22 Sep 2024 12:34:17 -0500 Subject: [PATCH] Set env variables in asdf install script for go --- scripts/asdf.install.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/asdf.install.sh b/scripts/asdf.install.sh index 5291890..3a9ee76 100755 --- a/scripts/asdf.install.sh +++ b/scripts/asdf.install.sh @@ -49,3 +49,13 @@ done #git clone --depth=1 https://github.com/mattmc3/antidote.git ${ZDOTDIR:-~}/.antidote +# If Go is already installed on the system (e.g. Codespaces), the built-in +# install interferes with the asdf install. +unset GOPATH +unset GOROOT +echo "export GOPATH=$(go env GOPATH)" >> ~/.bashrc +echo "export GOROOT=$(go env GOROOT)" >> ~/.bashrc +echo "export GOPATH=$(go env GOPATH)" >> ~/.zshrc +echo "export GOROOT=$(go env GOROOT)" >> ~/.zshrc +echo "set --export GOPATH (go env GOPATH)" >> ~/.config/fish/config.fish +echo "set --export GOROOT (go env GOROOT)" >> ~/.config/fish/config.fish