From 3b34e4eb9be26fb8a77325376b6b55ae95339436 Mon Sep 17 00:00:00 2001 From: Anthony Rose Date: Thu, 23 Jan 2025 08:16:03 +0000 Subject: [PATCH] Simplify go config --- roles/home-cli/files/profile | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/roles/home-cli/files/profile b/roles/home-cli/files/profile index 782cd42..8294e8b 100644 --- a/roles/home-cli/files/profile +++ b/roles/home-cli/files/profile @@ -279,22 +279,9 @@ then fi # Set up Go. -if [ -x "$ACP/opt/go/bin/go" ] || [ -x /usr/bin/go ] || [ -x /usr/local/bin/go ] +if command -v go >/dev/null then - export GOPROXY=https://proxy.golang.org - export GOPATH="$XDG_DATA_HOME/go" - if [ ! -d "$GOPATH" ] - then - mkdir -p "$GOPATH/bin" - mkdir -p "$GOPATH/pkg" - mkdir -p "$GOPATH/src" - fi - if [ -x "$ACP/opt/go/bin/go" ] - then - export GOROOT="$ACP/opt/go" - _acp_add_path "$GOROOT/bin" - fi - _acp_add_path "$GOPATH/bin" + _acp_add_path "$(go env GOPATH)" fi # Basic and extra prun (podman run) aliases.