diff --git a/Library/Homebrew/cask/artifact/pkg.rb b/Library/Homebrew/cask/artifact/pkg.rb index 924f731ae484f8..3ef8bd9fc8ee8d 100644 --- a/Library/Homebrew/cask/artifact/pkg.rb +++ b/Library/Homebrew/cask/artifact/pkg.rb @@ -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 @@ -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)