Skip to content

Commit 0ead7b7

Browse files
authored
[CI] Fix rebaseline-tests recipe (#23917)
Turns out $? doesn't work after the if/else is completed.
1 parent 0029627 commit 0ead7b7

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

.github/workflows/rebaseline-tests.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ jobs:
4444
echo "rebaseline_tests returned zero, expectations up-to-date"
4545
# Exit early and don't create a PR
4646
exit 0
47-
fi
48-
code=$?
49-
if [[ $code != 2 ]] ; then
50-
echo "rebaseline_tests.py failed with unexpected error $code"
51-
exit 1
47+
else
48+
code=$?
49+
if [[ $code != 2 ]] ; then
50+
echo "rebaseline_tests.py failed with unexpected error $code (expected 2)"
51+
exit 1
52+
fi
5253
fi
5354
git push origin testing
5455
gh pr create --fill --base ${{ github.ref_name }}

0 commit comments

Comments
 (0)