Skip to content

Commit

Permalink
fix count math
Browse files Browse the repository at this point in the history
  • Loading branch information
tannalynn committed Feb 3, 2023
1 parent 3e8ec15 commit da1bebb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/scripts/retry_command
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
count=0
return_val=1

while [[ $return_val != 0 && $count -le $RETRY_ATTEMPTS ]]; do
while [[ $return_val != 0 && $count -lt $RETRY_ATTEMPTS ]]; do
$TEST_CMD
return_val=$?
count+=1
count=$((count + 1))
if [[ $return_val != 0 ]]; then
echo $'\n*************************************************************************************************************\n'
echo "FAILURE ON ATTEMPT $((count+1)) of $((RETRY_ATTEMPTS+1))"
echo "FAILURE ON ATTEMPT $((count)) of $((RETRY_ATTEMPTS))"
echo $'\n*************************************************************************************************************\n'
fi
done
Expand Down

0 comments on commit da1bebb

Please sign in to comment.