Exception: TapFormulaWithOldnameAmbiguityError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, possible_tap_newname_formulae) ⇒ TapFormulaWithOldnameAmbiguityError



199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# File 'Library/Homebrew/exceptions.rb', line 199

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 the formula or use its new name.
  EOS
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name



197
198
199
# File 'Library/Homebrew/exceptions.rb', line 197

def name
  @name
end

#possible_tap_newname_formulaeObject (readonly)

Returns the value of attribute possible_tap_newname_formulae



197
198
199
# File 'Library/Homebrew/exceptions.rb', line 197

def possible_tap_newname_formulae
  @possible_tap_newname_formulae
end

#tapsObject (readonly)

Returns the value of attribute taps



197
198
199
# File 'Library/Homebrew/exceptions.rb', line 197

def taps
  @taps
end