Merge pull request #14 from munki/master

Merge upstream changes from Munki repo
This commit is contained in:
Graham Pugh 2020-02-03 15:45:33 +01:00 committed by GitHub
commit 36d5fd1252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -265,6 +265,9 @@ def unmountdmg(mountpoint):
def install_product(dist_path, target_vol): def install_product(dist_path, target_vol):
'''Install a product to a target volume. '''Install a product to a target volume.
Returns a boolean to indicate success or failure.''' 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] cmd = ['/usr/sbin/installer', '-pkg', dist_path, '-target', target_vol]
try: try:
subprocess.check_call(cmd) subprocess.check_call(cmd)