Exception: TapFormulaAmbiguityError Private
- Defined in:
- exceptions.rb
Overview
This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.
Raised when a formula with the same name is found in multiple taps.
Instance Attribute Summary collapse
- #loaders ⇒ Array<Formulary::FormulaLoader> readonly private
- #name ⇒ String readonly private
- #taps ⇒ Array<Tap> readonly private
Instance Method Summary collapse
- #initialize(name, loaders) ⇒ void constructor private
Constructor Details
#initialize(name, loaders) ⇒ void
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.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 |
# File 'exceptions.rb', line 376 def initialize(name, loaders) @name = name @loaders = loaders @taps = T.let(loaders.filter_map(&:tap), T::Array[Tap]) formulae = taps.map { |tap| "#{tap}/#{name}" } formula_list = formulae.map { |f| "\n * #{f}" }.join super <<~EOS Formulae found in multiple taps:#{formula_list} Please use the fully-qualified name (e.g. #{formulae.first}) to refer to a specific formula. EOS end |
Instance Attribute Details
#loaders ⇒ Array<Formulary::FormulaLoader> (readonly)
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.
373 374 375 |
# File 'exceptions.rb', line 373 def loaders @loaders end |
#name ⇒ String (readonly)
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.
367 368 369 |
# File 'exceptions.rb', line 367 def name @name end |
#taps ⇒ Array<Tap> (readonly)
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.
370 371 372 |
# File 'exceptions.rb', line 370 def taps @taps end |