Module: OS::Mac::FormulaInstaller Private

Extended by:
T::Helpers
Included in:
FormulaInstaller
Defined in:
extend/os/mac/formula_installer.rb

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

Instance Method Summary collapse

Instance Method Details

#check_developer_tools_for_bottle_pourvoid

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.

This method returns an undefined value.



18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'extend/os/mac/formula_installer.rb', line 18

def check_developer_tools_for_bottle_pour
  return unless ::Hardware::CPU.arm?
  return if formula.bottle_specification.skip_relocation?

  # TODO: Remove this check after pure-Ruby ad-hoc signing is released:
  # https://github.com/Homebrew/ruby-macho/pull/997
  # We need the developer tools for `codesign` when relocating bottles.
  require "diagnostic"
  unless (developer_tools_warning = ::Homebrew::Diagnostic::Checks.new.check_for_installed_developer_tools)
    return
  end

  ofail developer_tools_warning
  exit 1
end

#fresh_install?(formula) ⇒ Boolean?

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.

Parameters:

Returns:

  • (Boolean, nil)


12
13
14
15
# File 'extend/os/mac/formula_installer.rb', line 12

def fresh_install?(formula)
  !::Homebrew::EnvConfig.developer? && !OS::Mac.version.outdated_release? &&
    (installed_on_request? || !formula.any_version_installed?)
end