Merge pull request #20 from munki/main

Pulls @natewalck 's upstream changes into this fork
This commit is contained in:
Graham Pugh 2020-09-18 21:45:32 +01:00 committed by GitHub
commit 73e447c451
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -30,6 +30,7 @@ Product installation failed.
Use a compatible Mac or select a different build compatible with your current hardware and try again. You may also have success running the script in a VM; the InstallationCheck script in versions of the macOS installer to date skips the checks (and returns success) when run on a VM. Use a compatible Mac or select a different build compatible with your current hardware and try again. You may also have success running the script in a VM; the InstallationCheck script in versions of the macOS installer to date skips the checks (and returns success) when run on a VM.
##### important note for Catalina+
Catalina privacy protections might interfere with the operation of this tool if you run it from ~/Desktop, ~/Documents, ~/Downloads or other directories protected in Catalina. Consider using /Users/Shared (or subdirectory) as the "working space" for this tool. Catalina privacy protections might interfere with the operation of this tool if you run it from ~/Desktop, ~/Documents, ~/Downloads or other directories protected in Catalina. Consider using /Users/Shared (or subdirectory) as the "working space" for this tool.
Graham Pugh has a fork with a lot more features and bells and whistles. Check it out if your needs aren't met by this tool. https://github.com/grahampugh/macadmin-scripts Graham Pugh has a fork with a lot more features and bells and whistles. Check it out if your needs aren't met by this tool. https://github.com/grahampugh/macadmin-scripts

View File

@ -802,6 +802,16 @@ def main():
"run again with sudo or as root." "run again with sudo or as root."
) )
current_dir = os.getcwd()
if os.path.expanduser("~") in current_dir:
bad_dirs = ['Documents', 'Desktop', 'Downloads', 'Library']
for bad_dir in bad_dirs:
if bad_dir in os.path.split(this_dir):
print('Running this script from %s may not work as expected. '
'If this does not run as expected, please run again from '
'somewhere else, such as /Users/Shared.'
% current_dir, file=sys.stderr)
if args.catalogurl: if args.catalogurl:
su_catalog_url = args.catalogurl su_catalog_url = args.catalogurl
elif args.seedprogram: elif args.seedprogram: