Skip to content

Commit eb25d81

Browse files
committed
Use temporary folder for microsoft/go SDK
1 parent e040545 commit eb25d81

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.buildkite/scripts/common.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ with_msft_go() {
5555
echo "Setting up microsoft/go"
5656
create_workspace
5757
check_platform_architeture
58+
59+
# Use a temporary folder to house the Go SDK downloaded from Microsoft
60+
tempfolder=$(mktemp -d)
5861
MSFT_DOWNLOAD_URL=https://aka.ms/golang/release/latest/go$(cat .go-version).${platform_type}-${arch_type}.tar.gz
59-
retry 5 $(curl -sL -o - $MSFT_DOWNLOAD_URL | tar -xz -f - -C ${WORKSPACE}/../../)
60-
export PATH="${PATH}:${WORKSPACE}/../../go/bin"
62+
retry 5 $(curl -sL -o - $MSFT_DOWNLOAD_URL | tar -xz -f - -C ${tempfolder}/)
63+
export PATH="${PATH}:${tempfolder}/go/bin"
6164
go version
6265
which go
6366
export PATH="${PATH}:$(go env GOPATH)/bin"

0 commit comments

Comments
 (0)