Browse code

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 <bjorn.neergaard@docker.com>

Bjorn Neergaard authored on 2023/07/18 00:51:29
Showing 1 changed files
... ...
@@ -9,7 +9,7 @@ DOWNLOAD_URL="https://download.docker.com/linux/static/stable/$(xx-info march)/d
9 9
 
10 10
 mkdir "$outdir"
11 11
 if curl --head --silent --fail "${DOWNLOAD_URL}" 1> /dev/null 2>&1; then
12
-	curl -Ls "${DOWNLOAD_URL}" | tar -xz docker/docker
12
+	curl -fsSL "${DOWNLOAD_URL}" | tar -xz docker/docker
13 13
 	mv docker/docker "${outdir}/docker"
14 14
 else
15 15
 	git init -q .