mirror of
https://github.com/moby/moby.git
synced 2026-08-09 01:21:37 +00:00
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>
(cherry picked from commit 780e8b2332)
Signed-off-by: Bjorn Neergaard <bjorn.neergaard@docker.com>
This commit is contained in:
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user