Skip to content

Commit 427aeae

Browse files
vdemeesterclaude
authored andcommitted
Fix bash arithmetic exit status in sync-project-status workflow
Use prefix increment ((++VAR)) instead of postfix ((VAR++)). With postfix increment, when VAR=0, ((VAR++)) returns the old value (0), which in bash means exit status 1. With set -e, this exits the script. Prefix increment returns the new value (≥1), so exit status is always 0. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent b3cd31b commit 427aeae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/sync-project-status.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,15 @@ jobs:
103103
104104
if echo "$RESULT" | jq -e '.errors' > /dev/null 2>&1; then
105105
echo "::error::$REPO_NAME#$ISSUE_NUMBER: $(echo "$RESULT" | jq -r '.errors[0].message')"
106-
((ERRORS++))
106+
((++ERRORS))
107107
else
108-
((SYNCED++))
108+
((++SYNCED))
109109
fi
110110
111111
# Small delay to avoid rate limiting
112112
sleep 0.3
113113
else
114-
((SYNCED++))
114+
((++SYNCED))
115115
fi
116116
done < <(jq -c '.[]' /tmp/roadmap_issues.json)
117117
echo "::endgroup::"

0 commit comments

Comments
 (0)