Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagnostic: don't complain about missing homebrew/cask. #15698

Merged
merged 1 commit into from
Jul 18, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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_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 @@
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
Loading