Skip to content

Commit

Permalink
Delete existing go install before extracting new version
Browse files Browse the repository at this point in the history
  • Loading branch information
mitesch committed Aug 26, 2024
1 parent 07dc028 commit 53542d7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/go/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,8 @@ 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/*
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 53542d7

Please sign in to comment.