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

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

Instance Method Summary collapse

Instance Method Details

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



27
28
29
30
31
32
33
34
35
36
37
38
39
# File 'brew/Library/Homebrew/cask/artifact/installer.rb', line 27

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