Skip to content

Commit db37ef9

Browse files
committed
scripts: Handle edge case where there's zero remaining pop candidates left
Signed-off-by: timflannagan <[email protected]>
1 parent c8fae23 commit db37ef9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

scripts/sync_pop_candidate.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ function pop() {
6363
tmp_set=$(mktemp)
6464
tail -n +2 "${cherrypick_set}" > "${tmp_set}"; cat "${tmp_set}" > "${cherrypick_set}"
6565

66-
(( --remaining ))
66+
# Note: handle edge case where there's zero remaining to avoid
67+
# returning a non-zero exit code.
68+
(( --remaining )) || true
6769
printf '%d picks remaining (pop_all=%s)\n' "${remaining}" "${pop_all}"
6870

6971
if [[ $pop_all == 'true' ]] && (( remaining > 0 )); then

0 commit comments

Comments
 (0)