Exception: TapFormulaWithOldnameAmbiguityError
- Inherits:
-
RuntimeError
- Object
- RuntimeError
- TapFormulaWithOldnameAmbiguityError
- Defined in:
- Library/Homebrew/exceptions.rb
Overview
Raised when a formula's old name in a specific tap is found in multiple taps.
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#possible_tap_newname_formulae ⇒ Object
readonly
Returns the value of attribute possible_tap_newname_formulae.
-
#taps ⇒ Object
readonly
Returns the value of attribute taps.
Instance Method Summary collapse
-
#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError
constructor
A new instance of TapFormulaWithOldnameAmbiguityError.
Constructor Details
#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError
Returns a new instance of TapFormulaWithOldnameAmbiguityError.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'Library/Homebrew/exceptions.rb', line 236 def initialize(name, possible_tap_newname_formulae) @name = name @possible_tap_newname_formulae = possible_tap_newname_formulae @taps = possible_tap_newname_formulae.map do |newname| newname =~ HOMEBREW_TAP_FORMULA_REGEX "#{Regexp.last_match(1)}/#{Regexp.last_match(2)}" end super <<~EOS Formulae with '#{name}' old name found in multiple taps: #{taps.map { |t| "\n * #{t}" }.join} Please use the fully-qualified name (e.g. #{taps.first}/#{name}) to refer to the formula or use its new name. EOS end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name
234 235 236 |
# File 'Library/Homebrew/exceptions.rb', line 234 def name @name end |
#possible_tap_newname_formulae ⇒ Object (readonly)
Returns the value of attribute possible_tap_newname_formulae
234 235 236 |
# File 'Library/Homebrew/exceptions.rb', line 234 def possible_tap_newname_formulae @possible_tap_newname_formulae end |
#taps ⇒ Object (readonly)
Returns the value of attribute taps
234 235 236 |
# File 'Library/Homebrew/exceptions.rb', line 234 def taps @taps end |