Exception: TapFormulaAmbiguityError

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, paths) ⇒ TapFormulaAmbiguityError

Returns a new instance of TapFormulaAmbiguityError



185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'brew/Library/Homebrew/exceptions.rb', line 185

def initialize(name, paths)
  @name = name
  @paths = paths
  @formulae = paths.map do |path|
    "#{Tap.from_path(path).name}/#{path.basename(".rb")}"
  end

  super <<~EOS
    Formulae found in multiple taps: #{formulae.map { |f| "\n       * #{f}" }.join}

    Please use the fully-qualified name (e.g. #{formulae.first}) to refer to the formula.
  EOS
end

Instance Attribute Details

#formulaeObject (readonly)

Returns the value of attribute formulae



183
184
185
# File 'brew/Library/Homebrew/exceptions.rb', line 183

def formulae
  @formulae
end

#nameObject (readonly)

Returns the value of attribute name



183
184
185
# File 'brew/Library/Homebrew/exceptions.rb', line 183

def name
  @name
end

#pathsObject (readonly)

Returns the value of attribute paths



183
184
185
# File 'brew/Library/Homebrew/exceptions.rb', line 183

def paths
  @paths
end