mirror of
https://github.com/dockur/windows.git
synced 2026-07-28 21:53:34 +07:00
fix: Avoid pipefail when reading boot load size (#1988)
This commit is contained in:
+5
-6
@@ -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!"
|
||||
|
||||
Reference in New Issue
Block a user