Skip to content

Commit 4f86431

Browse files
committed
fix(ralph): prevent set -e from killing loop on timeout exit code
1 parent 7c5dcab commit 4f86431

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

ralph/ralph_loop.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -958,8 +958,9 @@ EOF
958958
done
959959

960960
# Wait for the process to finish and get exit code
961-
wait $claude_pid
962-
local exit_code=$?
961+
# Use || to prevent set -e from killing the script on non-zero (e.g. timeout 124)
962+
local exit_code=0
963+
wait $claude_pid || exit_code=$?
963964

964965
if [ $exit_code -eq 0 ]; then
965966
# Only increment counter on successful execution

0 commit comments

Comments
 (0)