Module: Cask::Artifact::Installer::ScriptInstaller Private

Defined in:
Library/Homebrew/cask/artifact/installer.rb

Overview

This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.

Extension module for script installers.

Instance Method Summary collapse

Instance Method Details

#install_phase(command: nil, **_) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.


33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'Library/Homebrew/cask/artifact/installer.rb', line 33

def install_phase(command: nil, **_)
  ohai "Running #{self.class.dsl_key} script '#{path}'"

  executable_path = staged_path_join_executable(path)

  command.run!(
    executable_path,
    **args,
    env: { "PATH" => PATH.new(
      HOMEBREW_PREFIX/"bin", HOMEBREW_PREFIX/"sbin", ENV["PATH"]
    ) },
  )
end