Skip to content

Commit

Permalink
Combine conditional
Browse files Browse the repository at this point in the history
Co-authored-by: Pat Brisbin <[email protected]>
  • Loading branch information
krumelmonster and pbrisbin authored Oct 20, 2024
1 parent 8994587 commit d7e2077
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bin/downgrade
Original file line number Diff line number Diff line change
Expand Up @@ -291,8 +291,7 @@ process_term() {
if ((DOWNGRADE_FROM_CACHE)); then
candidates+=($(search_cache "$name" | filter_packages "$name" "$operator" "$version"))
fi
if ((DOWNGRADE_FROM_ALA)); then
if ((DOWNGRADE_PREFER_CACHE == 0)) || (("${#candidates[@]}" == 0)); then
if ((DOWNGRADE_FROM_ALA)) && { ((!DOWNGRADE_PREFER_CACHE)) || ((!"${#candidates[@]}")) }; then
candidates=($(search_ala "$name" | filter_packages "$name" "$operator" "$version") "${candidates[@]}")
fi
fi
Expand Down

0 comments on commit d7e2077

Please sign in to comment.