From 544032f7a4df3c789353c7013e3db2903705bdec Mon Sep 17 00:00:00 2001 From: Bjorn Neergaard Date: Mon, 17 Jul 2023 09:51:29 -0600 Subject: [PATCH] hack/d/cli.sh: properly handle errors in curl Add `-f` to output nothing to tar if the curl fails, and `-S` to report errors if they happen. Signed-off-by: Bjorn Neergaard (cherry picked from commit 780e8b233242690f7a1d5c393be24fdcd26e1a5b) Signed-off-by: Bjorn Neergaard --- hack/dockerfile/cli.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/dockerfile/cli.sh b/hack/dockerfile/cli.sh index f821994650..9482736e55 100755 --- a/hack/dockerfile/cli.sh +++ b/hack/dockerfile/cli.sh @@ -9,7 +9,7 @@ DOWNLOAD_URL="https://download.docker.com/linux/static/stable/$(xx-info march)/d mkdir "$outdir" if curl --head --silent --fail "${DOWNLOAD_URL}" 1> /dev/null 2>&1; then - curl -Ls "${DOWNLOAD_URL}" | tar -xz docker/docker + curl -fsSL "${DOWNLOAD_URL}" | tar -xz docker/docker mv docker/docker "${outdir}/docker" else git init -q .