Compare commits

...

3 Commits

Author SHA1 Message Date
Naelson Douglas C. Oliveira c5ce1c6320
Merge a59ccaab4d into 236a08fda7 2024-03-08 12:50:14 -06:00
CorpNewt 236a08fda7
Assume non-interactive with -p or -v check -v with -b
--product and --version should already target only a single release and auto download/print URLs, so there's no need to have the user press a key after.

--build always requires a --version to function, so let's check that before trying to load the products in order to bail early.
2024-03-08 12:48:13 -06:00
naelsondouglas a59ccaab4d removed a singleton-comparison pitfall 2021-11-02 03:35:53 -03:00
1 changed files with 8 additions and 2 deletions

View File

@ -606,11 +606,17 @@ if __name__ == '__main__':
parser.add_argument("-D", "--device-id", help="use with --version or --latest to search for versions supporting the specified Device ID - eg VMM-x86_64 for any x86_64")
parser.add_argument("-i", "--print-urls", help="only prints the download URLs, does not actually download them", action="store_true")
parser.add_argument("-j", "--print-json", help="only prints the product metadata in JSON, does not actually download it", action="store_true")
parser.add_argument("--no-interactive", help="run in non-interactive mode", action="store_true")
parser.add_argument("--no-interactive", help="run in non-interactive mode (auto-enabled when using --product or --version)", action="store_true")
parser.add_argument("-o", "--download-dir", help="overrides directory where the downloaded files are saved")
args = parser.parse_args()
g = gibMacOS(interactive=not args.no_interactive, download_dir=args.download_dir)
if args.build and not (args.latest or args.product or args.version):
print("The --build option requires a --version")
exit(1)
interactive = not any((args.no_interactive,args.product,args.version))
g = gibMacOS(interactive=interactive, download_dir=args.download_dir)
if args.recovery:
args.dmg = False
g.find_recovery = args.recovery