Skip to content

Commit faa824b

Browse files
committed
fix: avoid subshell in PR update loop
Replace pipe to while loop with process substitution to prevent subshell execution. This allows variable assignments (counters) to persist properly throughout the entire loop and the workflow completes without exit code 1.
1 parent 5b84c86 commit faa824b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

.github/workflows/auto-update-prs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
FAILURE_COUNT=0
7878
SKIPPED_COUNT=0
7979
80-
echo "$BRANCHES" | jq -r '.[]' | while IFS= read -r branch; do
80+
while IFS= read -r branch; do
8181
[ -z "$branch" ] && continue
8282
8383
echo ""
@@ -108,7 +108,7 @@ jobs:
108108
git rebase --abort || true
109109
((FAILURE_COUNT++))
110110
fi
111-
done
111+
done < <(echo "$BRANCHES" | jq -r '.[]')
112112
113113
echo ""
114114
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

0 commit comments

Comments
 (0)