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>
This commit is contained in:
parent
12a19dcd84
commit
780e8b2332
1 changed files with 1 additions and 1 deletions
|
@ -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 .
|
||||
|
|
Loading…
Add table
Reference in a new issue