fix: Preserve signal exits during image detection (#2075)

This commit is contained in:
Kroese
2026-08-06 13:16:17 +02:00
committed by GitHub
parent 528b82c60d
commit 8f5a6b0b85
2 changed files with 21 additions and 11 deletions
+14 -2
View File
@@ -75,6 +75,10 @@ selectWindowsImage() {
return 0
fi
if (( detect_rc >= 129 )); then
return "$detect_rc"
fi
# Only code 1 indicates that extraction may recover detection.
if (( detect_rc != 1 )); then
skipUnattended "$dir" "$iso" "$boot" || return 76
@@ -88,12 +92,20 @@ selectWindowsImage() {
fi
extracted=1
detect_rc=0
if detectImage "$dir"; then
detectImage "$dir" || detect_rc=$?
if (( detect_rc == 0 )); then
return 0
fi
if (( detect_rc >= 129 )); then
return "$detect_rc"
fi
skipUnattended "$dir" "$iso" "$boot" || return 76
handled=1
return 0
}
@@ -832,7 +844,7 @@ detectImage() {
wim=$(findImage "$dir") || return 1
local image_info
image_info=$(readImageInfo "$wim") || return 1
image_info=$(readImageInfo "$wim") || return $?
detectImageInfo "$image_info"
}