From e7e637531e55d270f3f11858f5d43ebf52d29830 Mon Sep 17 00:00:00 2001 From: Kroese Date: Sun, 26 Jul 2026 07:07:03 +0200 Subject: [PATCH] fix: Avoid pipefail when reading boot load size (#1988) --- src/image.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/image.sh b/src/image.sh index c2634d4f..2f1f9cad 100644 --- a/src/image.sh +++ b/src/image.sh @@ -1191,15 +1191,14 @@ getBootLoadSize() { local iso="$1" local desc="$2" - local value + local boot_info value - value=$( - isoinfo -d -i "$iso" | - awk '/Nsect / { print $NF; exit }' - ) || { + if ! boot_info=$(isoinfo -d -i "$iso"); then error "Failed to read boot image information from $desc ISO!" return 1 - } + fi + + value=$(awk '/Nsect / { print $NF; exit }' <<< "$boot_info") if [ -z "$value" ]; then error "Failed to determine boot image load size from $desc ISO!"