Skip to content

Commit

Permalink
Don't use return for breaking loops
Browse files Browse the repository at this point in the history
This is only available inside functions.
  • Loading branch information
yorickpeterse committed Oct 30, 2023
1 parent fdaf625 commit 7cc3377
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/aur.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ then
for i in {1..3}
do
info 'Pushing to the AUR'
git push origin "${aur_branch}" && return
git push origin "${aur_branch}" && exit 0
info "Push attempt $i failed, retrying..."
done

Expand Down
2 changes: 1 addition & 1 deletion scripts/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ then
for i in {1..3}
do
info 'Pushing to main'
git push origin main && return
git push origin main && exit 0
info "Push attempt $i failed, retrying..."
done

Expand Down

0 comments on commit 7cc3377

Please sign in to comment.