Class: Homebrew::InstallSteps::Runner Private

Inherits:
Object
  • Object
show all
Includes:
SystemCommand::Mixin, Utils::Output::Mixin
Defined in:
install_steps.rb

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.

Constant Summary collapse

CONTENT_PATH_TOKENS =

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

Path tokens reuse the step base resolution; formula metadata tokens are resolved separately. Anything else is left verbatim so literal braces in templates are never rewritten.

%w[
  prefix opt_prefix bin sbin lib libexec share pkgshare var etc pkgetc staged_path appdir caskroom_path
  temp rack
  bash_completion zsh_completion fish_completion pwsh_completion
].freeze

Instance Method Summary collapse

Methods included from Utils::Output::Mixin

#issue_reporting_message, #odebug, #odeprecated, #odie, #odisabled, #ofail, #oh1, #oh1_title, #ohai, #ohai_title, #onoe, #opoo, #opoo_outside_github_actions, #opoo_without_github_actions_annotation, #pretty_deprecated, #pretty_disabled, #pretty_duration, #pretty_install_status, #pretty_installed, #pretty_uninstalled, #pretty_unmarked, #pretty_upgradable, #pretty_warning

Methods included from SystemCommand::Mixin

#system_command, #system_command!

Constructor Details

#initialize(context:, command: SystemCommand) ⇒ void

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:



630
631
632
633
634
# File 'install_steps.rb', line 630

def initialize(context:, command: SystemCommand)
  @context = context
  @command = command
  @guard_results = T.let({}, T::Hash[PathSpec, T::Boolean])
end

Instance Method Details

#run(steps, phase: :install) ⇒ void

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.

Parameters:



637
638
639
640
641
642
643
644
645
646
# File 'install_steps.rb', line 637

def run(steps, phase: :install)
  @guard_results.clear
  DSL.normalise_steps(steps).each do |step|
    if phase == :uninstall
      run_uninstall_step(step)
    else
      run_install_step(step)
    end
  end
end