Skip to content

Commit

Permalink
diagnostic: don't complain about missing homebrew/cask.
Browse files Browse the repository at this point in the history
Unless we're in no API mode: we shouldn't check this.

Fixes #15696
  • Loading branch information
MikeMcQuaid committed Jul 18, 2023
1 parent da01f8f commit 37ec0c6
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 }

Check warning on line 925 in Library/Homebrew/diagnostic.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/diagnostic.rb#L925

Added line #L925 was not covered by tests
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|

Check warning on line 930 in Library/Homebrew/diagnostic.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/diagnostic.rb#L930

Added line #L930 was not covered by tests
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)

Check warning on line 945 in Library/Homebrew/diagnostic.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/diagnostic.rb#L945

Added line #L945 was not covered by tests
"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 37ec0c6

Please sign in to comment.