Module: Homebrew::Bundle::Skipper Private
- Defined in:
- bundle/skipper.rb
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Class Method Summary collapse
Class Method Details
.skip?(entry, silent: false) ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'bundle/skipper.rb', line 10 def skip?(entry, silent: false) require "bundle/brew_dumper" # TODO: use extend/OS here # rubocop:todo Homebrew/MoveToExtendOS if (Hardware::CPU.arm? || OS.linux?) && Homebrew.default_prefix? && entry.type == :brew && entry.name.exclude?("/") && (formula = BrewDumper.formulae_by_full_name(entry.name)) && formula[:official_tap] && !formula[:bottled] reason = Hardware::CPU.arm? ? "Apple Silicon" : "Linux" puts Formatter.warning "Skipping #{entry.name} (no bottle for #{reason})" unless silent return true end # rubocop:enable Homebrew/MoveToExtendOS return true if @failed_taps&.any? do |tap| prefix = "#{tap}/" entry.name.start_with?(prefix) || entry.[:full_name]&.start_with?(prefix) end entry_type_skips = Array(skipped_entries[entry.type]) return false if entry_type_skips.empty? # Check the name or ID particularly for Mac App Store entries where they # can have spaces in the names (and the `mas` output format changes on # occasion). entry_ids = [entry.name, entry.[:id]&.to_s].compact return false unless entry_type_skips.intersect?(entry_ids) puts Formatter.warning "Skipping #{entry.name}" unless silent true end |
.tap_failed!(tap_name) ⇒ Object
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
44 45 46 47 |
# File 'bundle/skipper.rb', line 44 def tap_failed!(tap_name) @failed_taps ||= [] @failed_taps << tap_name end |