From 96bb710d85c0b6ee98d44286828205186aa0277e Mon Sep 17 00:00:00 2001 From: shinjukumiku <60507302+shinjukumiku@users.noreply.github.com> Date: Fri, 31 Jan 2020 11:19:53 +0000 Subject: [PATCH] installmacos.py: install_product: set CM_BUILD Set CM_BUILD env var in install_product() This makes it possible to install machine-specific OS builds on 'non-supported' hardware for example, 10.14.4 (18E2034) on machines that aren't iMac19,1 or iMac19,2. --- installinstallmacos.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/installinstallmacos.py b/installinstallmacos.py index f414ac9..5b63bbb 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -208,6 +208,9 @@ def unmountdmg(mountpoint): def install_product(dist_path, target_vol): '''Install a product to a target volume. Returns a boolean to indicate success or failure.''' + # set CM_BUILD env var to make Installer bypass eligibilty checks + # when installing packages (for machine-specific OS builds) + os.environ["CM_BUILD"] = "CM_BUILD" cmd = ['/usr/sbin/installer', '-pkg', dist_path, '-target', target_vol] try: subprocess.check_call(cmd)