Skip to content

Commit

Permalink
fix: Delete ISO when extraction fails (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese authored Apr 13, 2024
1 parent 01b8a08 commit 28da9e3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
.gitmodules
Dockerfile
Dockerfile.archive
compose.yml
compose.yaml
docker-compose.yml
docker-compose.yaml

*.md
3 changes: 2 additions & 1 deletion src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,6 @@ startInstall() {
ISO="$STORAGE/$CUSTOM"
fi

rm -f "$TMP/$BASE"
return 0
}

Expand Down Expand Up @@ -413,6 +412,7 @@ extractImage() {
if [[ "${iso,,}" == *".esd" ]]; then
if ! extractESD "$iso" "$dir"; then
error "Failed to extract ESD file!"
rm -f "$iso"
exit 67
fi
return 0
Expand Down Expand Up @@ -444,6 +444,7 @@ extractImage() {

if ! 7z x "$iso" -o"$dir" > /dev/null; then
error "Failed to extract ISO file!"
rm -f "$iso"
exit 66
fi

Expand Down

0 comments on commit 28da9e3

Please sign in to comment.