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

Defined in:
cask/artifact/installer.rb

Overview

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.

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. 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.



33
34
35
36
37
38
39
40
41
42
43
44
45
# File '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