fix(deploy): preserve rc under set -e (run_quiet swallowed errors silently)

'wait $pid' triggered 'set -e' before 'local rc=$?' could capture exit code,
so xcodebuild failures vanished without any log dump. Use 'wait $pid && rc=0 || rc=$?'
idiom to keep the script alive and let the error-dump branch run.
This commit is contained in:
chahinebrini 2026-05-30 10:05:10 +02:00
parent 061bd2d799
commit 9f8e99d287

View File

@ -174,7 +174,7 @@ run_quiet() {
return ${PIPESTATUS[0]}
fi
local start=$SECONDS
local expected pid elapsed subtitle
local expected pid elapsed subtitle rc
expected=$(runtime_lookup "$label" || echo 0)
expected=${expected:-0}
RUN_QUIET_I=0
@ -203,8 +203,7 @@ run_quiet() {
render_progress "$elapsed" "$expected" "$label" "$subtitle"
sleep 0.2
done
wait "$pid"
local rc=$?
wait "$pid" && rc=0 || rc=$?
elapsed=$((SECONDS - start))
# Clear progress line
printf '\r\033[K' >&2