Skip to content

Commit

Permalink
build: add --unlink-first to tar command while extracting Golang
Browse files Browse the repository at this point in the history
While extracting the Golang archive, `tar` errors out with `Operation
not permitted` when it changes permissions for directories. The
`--unlink-first` option removes the files first, so that no change in
mode is needed.

Signed-off-by: Niels de Vos <ndevos@ibm.com>
  • Loading branch information
nixpanic committed Apr 25, 2024
1 parent 2887747 commit 4897b77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Dockerfile.test
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ RUN source /build.env \
&& gem install mdl \
&& mkdir -p ${GOROOT} \
&& curl https://storage.googleapis.com/golang/go${GOLANG_VERSION}.linux-${GOARCH}.tar.gz \
| tar xzf - -C ${GOROOT} --strip-components=1 \
| tar xzf - -C ${GOROOT} --strip-components=1 --unlink-first \
&& curl -sf "https://raw.githubusercontent.com/golangci/golangci-lint/${GOLANGCI_VERSION}/install.sh" \
| bash -s -- -b ${GOPATH}/bin "${GOLANGCI_VERSION}" \
&& curl -L "${HELM_SCRIPT}" | bash -s -- --version "${HELM_VERSION}" \
Expand Down

0 comments on commit 4897b77

Please sign in to comment.