fix: Avoid pipefail when reading boot load size (#1988)

This commit is contained in:
Kroese
2026-07-26 07:07:03 +02:00
committed by GitHub
parent b90ded928b
commit e7e637531e
+5 -6
View File
@@ -1191,15 +1191,14 @@ getBootLoadSize() {
local iso="$1" local iso="$1"
local desc="$2" local desc="$2"
local value local boot_info value
value=$( if ! boot_info=$(isoinfo -d -i "$iso"); then
isoinfo -d -i "$iso" |
awk '/Nsect / { print $NF; exit }'
) || {
error "Failed to read boot image information from $desc ISO!" error "Failed to read boot image information from $desc ISO!"
return 1 return 1
} fi
value=$(awk '/Nsect / { print $NF; exit }' <<< "$boot_info")
if [ -z "$value" ]; then if [ -z "$value" ]; then
error "Failed to determine boot image load size from $desc ISO!" error "Failed to determine boot image load size from $desc ISO!"