Exception: UnbottledError Private

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

Overview

This class is part of a private API. This class may only be used in the Homebrew/brew repository. Third parties should avoid using this class if possible, as it may be removed or changed without warning.

Raised if the formula or its dependencies are not bottled and are being installed in a situation where a bottle is required.

Instance Method Summary collapse

Constructor Details

#initialize(formulae) ⇒ UnbottledError

This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.

Returns a new instance of UnbottledError.



566
567
568
569
570
571
572
573
574
575
576
577
# File 'exceptions.rb', line 566

def initialize(formulae)
  require "utils"

  msg = <<~EOS
    The following #{Utils.pluralize("formula", formulae.count, plural: "e")} cannot be installed from #{Utils.pluralize("bottle", formulae.count)} and must be
    built from source.
      #{formulae.to_sentence}
  EOS
  msg += "#{DevelopmentTools.installation_instructions}\n" unless DevelopmentTools.installed?
  msg.freeze
  super(msg)
end