From ac754853d0e092b7620e7613e250d6a10714b098 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sat, 13 Apr 2024 16:29:14 +0200 Subject: [PATCH] fix: Delete ISO when extraction fails --- src/install.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/install.sh b/src/install.sh index 35df436..436cad8 100644 --- a/src/install.sh +++ b/src/install.sh @@ -573,6 +573,8 @@ extractImage() { if [[ "${iso,,}" == *".esd" ]]; then if ! extractESD "$iso" "$dir"; then + rm -f "$iso" + rm -rf "$TMP" error "Failed to extract ESD file!" exit 67 fi @@ -605,6 +607,8 @@ extractImage() { if ! 7z x "$iso" -o"$dir" > /dev/null; then error "Failed to extract ISO file!" + rm -f "$iso" + rm -rf "$TMP" exit 66 fi