Skip to content

Commit

Permalink
Don't delete base zip image after unpack error
Browse files Browse the repository at this point in the history
  • Loading branch information
urpylka committed Apr 28, 2021
1 parent 269cc1d commit 592b2bc
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions img-tool
Original file line number Diff line number Diff line change
Expand Up @@ -309,10 +309,7 @@ load() {
rich_echo "Unzipping Linux distribution image" "BLUE" \
&& unzip -p ${IMG_DIR}/${RPI_ZIP_NAME} ${RPI_IMAGE_NAME} > ${IMG_PATH} \
&& rich_echo "Unzipping completed" "GREEN" \
|| (
rich_echo "Unzipping failed!" "RED";
rm ${IMG_DIR}/${RPI_ZIP_NAME} && rich_echo "Zip-file was removed" "RED";
exit 1)
|| (rich_echo "Unzipping failed! Check your base image" "RED"; exit 1)
}

exec() {
Expand Down

0 comments on commit 592b2bc

Please sign in to comment.