Skip to content

Commit

Permalink
Handle download failure
Browse files Browse the repository at this point in the history
  • Loading branch information
NeroReflex committed Aug 22, 2024
1 parent 2c974bd commit 5a5bb4b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion __frzr-deploy
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,13 @@ frzr_deploy() {
sleep 1;
done
elif [ "${SHOW_UI}" = "0" ]; then
curl --http1.1 -L -o "${IMG_FILE}" -C - "${IMG_URL}"
if ! curl --http1.1 -L -o "${IMG_FILE}" -C - "${IMG_URL}"; then
TASK_ERROR=1
TASK_ERROR_MSG="Download failed"
STATE="FAIL"
send_data
continue
fi
else
TASK_MSG="Using Whiptail to show download progress"
send_data
Expand Down

0 comments on commit 5a5bb4b

Please sign in to comment.