Skip to content

Commit

Permalink
Update src/go/install.sh
Browse files Browse the repository at this point in the history
Co-authored-by: Samruddhi Khandale <samruddhikhandale@github.com>
  • Loading branch information
mitesch and samruddhikhandale authored Feb 13, 2025
1 parent ff74765 commit 7f559c4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/go/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,10 @@ if [[ "${TARGET_GO_VERSION}" != "none" ]] && [[ "$(go version 2>/dev/null)" != *
fi
curl -fsSL -o /tmp/go.tar.gz.asc "https://golang.org/dl/go${TARGET_GO_VERSION}.linux-${architecture}.tar.gz.asc"
gpg --verify /tmp/go.tar.gz.asc /tmp/go.tar.gz
echo "Removing existing Go ${TARGET_GOROOT}..."
rm -rf "${TARGET_GOROOT:?}/"*
if [ -n "${TARGET_GOROOT}" ] && [ -d "${TARGET_GOROOT}" ]; then
echo "Removing existing Go installation at ${TARGET_GOROOT}..."
rm -rf "${TARGET_GOROOT}/"*
fi
echo "Extracting Go ${TARGET_GO_VERSION}..."
tar -xzf /tmp/go.tar.gz -C "${TARGET_GOROOT}" --strip-components=1
rm -rf /tmp/go.tar.gz /tmp/go.tar.gz.asc /tmp/tmp-gnupg
Expand Down

0 comments on commit 7f559c4

Please sign in to comment.