Skip to content

Commit

Permalink
Merge pull request #17466 from Homebrew/cask_taps_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid authored Jun 11, 2024
2 parents 3f08c75 + 68c5d61 commit a113099
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Library/Homebrew/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -945,16 +945,17 @@ def check_cask_taps

taps = (Tap.to_a + [CoreCaskTap.instance]).uniq

add_info "Homebrew Cask Taps:", (taps.map do |tap|
add_info "Homebrew Cask Taps:", taps.filter_map do |tap|
cask_count = begin
tap.cask_files.count
rescue
error_tap_paths << tap.path
0
end
next if cask_count.zero?

"#{tap.path} (#{Utils.pluralize("cask", cask_count, include_count: true)})"
end)
end

taps_string = Utils.pluralize("tap", error_tap_paths.count)
"Unable to read from cask #{taps_string}: #{error_tap_paths.to_sentence}" if error_tap_paths.present?
Expand Down

0 comments on commit a113099

Please sign in to comment.