Skip to content

Commit

Permalink
Merge pull request #15698 from MikeMcQuaid/brew_doctor_cask
Browse files Browse the repository at this point in the history
diagnostic: don't complain about missing homebrew/cask.
  • Loading branch information
MikeMcQuaid committed Jul 18, 2023
2 parents 68aa5da + 37ec0c6 commit 5d03bff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Library/Homebrew/diagnostic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -922,11 +922,12 @@ def check_cask_staging_location

def check_cask_taps
default_cask_tap = CoreCaskTap.instance
alt_taps = Tap.select { |t| t.cask_dir.exist? && t != default_cask_tap }
taps = Tap.select { |t| t.cask_dir.exist? && t != default_cask_tap }
taps.prepend(default_cask_tap) if EnvConfig.no_install_from_api?

error_tap_paths = []

add_info "Homebrew Cask Taps:", ([default_cask_tap, *alt_taps].map do |tap|
add_info "Homebrew Cask Taps:", (taps.map do |tap|
if tap.path.blank?
none_string
else
Expand All @@ -941,8 +942,8 @@ def check_cask_taps
end
end)

taps = Utils.pluralize("tap", error_tap_paths.count)
"Unable to read from cask #{taps}: #{error_tap_paths.to_sentence}" if error_tap_paths.present?
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?
end

def check_cask_load_path
Expand Down

0 comments on commit 5d03bff

Please sign in to comment.