Exception: BuildToolsError

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

Overview

raised by FormulaInstaller.check_dependencies_bottled and FormulaInstaller.install if the formula or its dependencies are not bottled and are being installed on a system without necessary build tools

Instance Method Summary collapse

Constructor Details

#initialize(formulae) ⇒ BuildToolsError

Returns a new instance of BuildToolsError



439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
# File 'Library/Homebrew/exceptions.rb', line 439

def initialize(formulae)
  if formulae.length > 1
    formula_text = "formulae"
    package_text = "binary packages"
  else
    formula_text = "formula"
    package_text = "a binary package"
  end

  super <<~EOS
    The following #{formula_text}:
      #{formulae.join(", ")}
    cannot be installed as #{package_text} and must be built from source.
    #{DevelopmentTools.installation_instructions}
  EOS
end