Sort formulae_and_casks_to_check in Livecheck#livecheck

This commit is contained in:
Seeker 2020-09-03 20:33:24 -07:00 committed by Sam Ford
parent 0e8cebbb5b
commit e40bc65414
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE
2 changed files with 3 additions and 1 deletions

View File

@ -74,6 +74,8 @@ module Homebrew
rescue Errno::ENOENT => e
onoe e
end
end.sort_by do |formula_or_cask|
formula_or_cask.respond_to?("token") ? formula_or_cask.token : formula_or_cask.name
end
raise UsageError, "No formulae or casks to check." if formulae_and_casks_to_check.blank?

View File

@ -92,7 +92,7 @@ module Homebrew
)
end
formulae_checked = formulae_and_casks_to_check.sort_by(&:name).map.with_index do |formula_or_cask, i|
formulae_checked = formulae_and_casks_to_check.map.with_index do |formula_or_cask, i|
formula = formula_or_cask if formula_or_cask.is_a?(Formula)
cask = formula_or_cask if formula_or_cask.is_a?(Cask::Cask)