From 4993dfffe665967cc66792dbc7193e59afc97b99 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Mon, 25 Mar 2019 11:25:07 +0800 Subject: [PATCH] ci: Add a failed execution check for curl There is no checks for curl get 404 or something else. Add a check for it. Fixes: #1411 Signed-off-by: Hui Zhu --- .ci/install-yq.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.ci/install-yq.sh b/.ci/install-yq.sh index 794cbd726b..6ef58b368b 100755 --- a/.ci/install-yq.sh +++ b/.ci/install-yq.sh @@ -59,7 +59,8 @@ function install_yq() { local yq_version=2.3.0 local yq_url="https://${yq_pkg}/releases/download/${yq_version}/yq_${goos}_${goarch}" - curl -o "${yq_path}" -LSs ${yq_url} + curl -o "${yq_path}" -LSsf ${yq_url} + [ $? -ne 0 ] && die "Download ${yq_url} failed" chmod +x ${yq_path} if ! command -v "${yq_path}" >/dev/null; then