From 59b7fa94454f1f5721bc845e6f0e9ec84b543e4d Mon Sep 17 00:00:00 2001 From: Jeremy Hanna Date: Tue, 10 Dec 2024 12:15:01 -0500 Subject: [PATCH 1/2] We ended up managing the toolchain PATH with omnibus in the agent codebase --- setup_go.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/setup_go.sh b/setup_go.sh index 92f8c942..0c90cf00 100755 --- a/setup_go.sh +++ b/setup_go.sh @@ -32,13 +32,3 @@ echo "Installing Microsoft Go" curl -SL -o /tmp/golang.tar.gz https://aka.ms/golang/release/latest/go${GO_VERSION}-1.linux-${GOARCH}.tar.gz echo "$MSGO_SHA256 /tmp/golang.tar.gz" | sha256sum --check mkdir /usr/local/msgo && tar --strip-components=1 -C /usr/local/msgo/ -xzf /tmp/golang.tar.gz && rm -f /tmp/golang.tar.gz; - -cat << EOF >> /root/.bashrc -if [ "\$DD_GO_TOOLCHAIN" = "msgo" ]; then - export PATH="/usr/local/msgo/bin:\$PATH" - export GOROOT="/usr/local/msgo" -else - export PATH="/usr/local/go/bin:\$PATH" - export GOROOT="/usr/local/go" -fi -EOF From 27ba5208a3e9f38c3a91fef36bac443f6c0a65df Mon Sep 17 00:00:00 2001 From: Jeremy Hanna Date: Tue, 10 Dec 2024 15:15:43 -0500 Subject: [PATCH 2/2] Keep the append to .bashrc but remove the if statement for msgo --- setup_go.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup_go.sh b/setup_go.sh index 0c90cf00..ec9dbc75 100755 --- a/setup_go.sh +++ b/setup_go.sh @@ -32,3 +32,8 @@ echo "Installing Microsoft Go" curl -SL -o /tmp/golang.tar.gz https://aka.ms/golang/release/latest/go${GO_VERSION}-1.linux-${GOARCH}.tar.gz echo "$MSGO_SHA256 /tmp/golang.tar.gz" | sha256sum --check mkdir /usr/local/msgo && tar --strip-components=1 -C /usr/local/msgo/ -xzf /tmp/golang.tar.gz && rm -f /tmp/golang.tar.gz; + +cat << EOF >> /root/.bashrc +export PATH="/usr/local/go/bin:\$PATH" +export GOROOT="/usr/local/go" +EOF