Remove empty ISOs if download fails

This commit is contained in:
Joshua Boniface 2023-09-01 15:41:54 -04:00
parent 4531600a5a
commit 8368a302a7
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ prepare_iso() {
if [[ ! -f artifacts/${srcliveisofile} ]]; then
echo -n "Downloading Debian Live ISO... "
wget -O artifacts/${srcliveisofile} ${srcliveisourl} &>/dev/null || fail "Error downloading source ISO."
wget -O artifacts/${srcliveisofile} ${srcliveisourl} &>/dev/null || { rm -f artifacts/${srcliveisofile}; fail "Error downloading source ISO." }
echo "done."
fi