From 85fbc308f05625a54eb3627c00cde0a9e4ded067 Mon Sep 17 00:00:00 2001 From: Tony Blyler Date: Tue, 19 Nov 2024 10:06:04 -0500 Subject: [PATCH] use custom GOPATH --- chezmoi/dot_zshenv | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/chezmoi/dot_zshenv b/chezmoi/dot_zshenv index e78d2ef..df9caa5 100644 --- a/chezmoi/dot_zshenv +++ b/chezmoi/dot_zshenv @@ -76,13 +76,9 @@ if command -v pnpm &> /dev/null; then fi if command -v go &> /dev/null; then - GOPATH="$(go env GOPATH)" - if [ -d "${GOPATH}" ]; then - export GOPATH - export PATH="${GOPATH}/bin:${PATH}" - else - unset GOPATH - fi + export GOPATH="${HOME}/.gopath" + mkdir -p "${GOPATH}" + export PATH="${GOPATH}/bin:${PATH}" fi if command -v lazygit &> /dev/null; then