From 3e993f80b5477c0ea968112bcd45cd25daa6f4d4 Mon Sep 17 00:00:00 2001 From: agw Date: Fri, 2 Oct 2026 19:28:27 +0200 Subject: [PATCH] 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 --- build/build-jasp.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/build-jasp.sh b/build/build-jasp.sh index cd28238..6499248 100755 --- a/build/build-jasp.sh +++ b/build/build-jasp.sh @@ -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