Log the real exit status when a module build does not finish

The command substitution in the message ran before $? was expanded, so every
failure was reported as exit 0. Capture the status first, and say so when the
time limit was hit.

Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9
This commit is contained in:
agw
2026-10-02 19:28:27 +02:00
parent 4b6797f6f2
commit 3e993f80b5
+1 -1
View File
@@ -441,7 +441,7 @@ for attempt in 1 2 3; do
for path in "${MODULE_PATHS[@]}"; do
timeout --kill-after=60 "${MODULE_TIMEOUT:-5400}" \
Rscript /work/build/build-modules.R "$path" \
|| log "$(basename "$path") did not finish (exit $?), retrying next pass"
|| { rc=$?; log "$(basename "$path") did not finish (exit $rc$([[ $rc -eq 124 ]] && echo ', timed out')), retrying next pass"; }
done
built=0
for module in "${ALL_MODULES[@]}"; do