Exception: TapFormulaWithOldnameAmbiguityError

Inherits:
RuntimeError
  • Object
show all
Defined in:
brew/Library/Homebrew/exceptions.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError

Returns a new instance of TapFormulaWithOldnameAmbiguityError



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'brew/Library/Homebrew/exceptions.rb', line 203

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

#nameObject (readonly)

Returns the value of attribute name



201
202
203
# File 'brew/Library/Homebrew/exceptions.rb', line 201

def name
  @name
end

#possible_tap_newname_formulaeObject (readonly)

Returns the value of attribute possible_tap_newname_formulae



201
202
203
# File 'brew/Library/Homebrew/exceptions.rb', line 201

def possible_tap_newname_formulae
  @possible_tap_newname_formulae
end

#tapsObject (readonly)

Returns the value of attribute taps



201
202
203
# File 'brew/Library/Homebrew/exceptions.rb', line 201

def taps
  @taps
end