Skip to content

Commit

Permalink
Allow specifying pkg target
Browse files Browse the repository at this point in the history
One such target is 'CurrentUserHomeDirectory'. See `installer -help`.
  • Loading branch information
sambostock committed Jan 20, 2023
1 parent 4cf365f commit fc8ca1f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Library/Homebrew/cask/artifact/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Pkg < AbstractArtifact
attr_reader :path, :stanza_options

def self.from_args(cask, path, **stanza_options)
stanza_options.assert_valid_keys!(:allow_untrusted, :choices)
stanza_options.assert_valid_keys!(:allow_untrusted, :choices, :target)
new(cask, path, **stanza_options)
end

Expand Down Expand Up @@ -54,7 +54,7 @@ def run_installer(command: nil, verbose: false, **_options)

args = [
"-pkg", path,
"-target", "/"
"-target", stanza_options.fetch(:target, "/"),
]
args << "-verboseR" if verbose
args << "-allowUntrusted" if stanza_options.fetch(:allow_untrusted, false)
Expand Down

0 comments on commit fc8ca1f

Please sign in to comment.