From fc8ca1ff733043f4252635ca0795b02655e292b6 Mon Sep 17 00:00:00 2001 From: Sam Bostock Date: Fri, 20 Jan 2023 14:57:39 -0500 Subject: [PATCH] Allow specifying pkg target One such target is 'CurrentUserHomeDirectory'. See `installer -help`. --- Library/Homebrew/cask/artifact/pkg.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)