fix(quickget): exit on curl failure in web_get
Add exit 1 after curl failure handling in web_get - Exit immediately when a download via curl fails - Prevent continuing to build invalid VM configs after failed download Fixes #1625
This commit is contained in:
parent
57cd52b1dc
commit
a56a43342d
1
quickget
1
quickget
|
|
@ -1618,6 +1618,7 @@ function web_get() {
|
||||||
if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
if ! curl --disable --progress-bar --location --output "${DIR}/${FILE}" --continue-at - --user-agent "${USER_AGENT}" "${HEADERS[@]}" -- "${URL}"; then
|
||||||
echo "ERROR! Failed to download ${URL} with curl."
|
echo "ERROR! Failed to download ${URL} with curl."
|
||||||
rm -f "${DIR}/${FILE}"
|
rm -f "${DIR}/${FILE}"
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue