Skip to content

Commit

Permalink
from_remote_fetch: delete image if download failed
Browse files Browse the repository at this point in the history
Do not save an incorrectly downloaded image in the cache.

This closes #31.
  • Loading branch information
oxzi committed May 2, 2021
1 parent b647a41 commit cc8423e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/from_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ from_remote_fetch() {
else
echo "Fetching remote: ${url}"
mkdir -p "$(dirname "${download_path}")"
wget --progress=dot:giga -O "${download_path}" "${url}"
wget --progress=dot:giga -O "${download_path}" "${url}" || rm "${download_path}"
fi

local tmpfile
Expand Down

0 comments on commit cc8423e

Please sign in to comment.