feat: Improve legacy driver injection (#2058)

This commit is contained in:
Kroese
2026-08-05 10:44:26 +02:00
committed by GitHub
parent fd5806105e
commit 1babe34333
2 changed files with 57 additions and 19 deletions
+7 -2
View File
@@ -434,7 +434,7 @@ getImageSize() {
local stage="$1"
local folder="${2:-}"
local size bytes path
local size bytes path output
local required large_file
local mib=$((1024 * 1024))
local minimum=$((64 * mib))
@@ -458,7 +458,12 @@ getImageSize() {
for path in "${paths[@]}"; do
if ! read -r bytes _ < <(du -Llsb --apparent-size -- "$path"); then
if ! output=$(du -Llsb --apparent-size -- "$path"); then
error "Failed to calculate setup size!"
return 1
fi
if ! read -r bytes _ <<< "$output" || [[ ! "$bytes" =~ ^[0-9]+$ ]]; then
error "Failed to calculate setup size!"
return 1
fi