From 7e56e3d5d6b3a621c7c74f5f27389c5fe8401022 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Dec 06 2017 01:24:36 +0000 Subject: bin/get_formulas.py: --update should work without args as well --update takes zero to * args. If it is not set, it reports None, while if it is on but without args passed, it is set to an empty list. Thus, this commit fixes the issue that the script failed to run if no args were given to it --- diff --git a/bin/get_formulas.py b/bin/get_formulas.py index 3b795e0..22749a1 100755 --- a/bin/get_formulas.py +++ b/bin/get_formulas.py @@ -201,7 +201,7 @@ if args.remove_symlinks: remove_symlinks() # Every option below requires the --destination argument to be set -if args.clone or args.symlink or args.clone_from or args.clone_branch or args.add_remote or args.update or args.push or args.checkout: +if args.clone or args.symlink or args.clone_from or args.clone_branch or args.add_remote or type(args.update) == list or args.push or args.checkout: will_run = True if (args.clone_from or args.clone_branch) and not args.clone: @@ -233,7 +233,7 @@ if args.clone or args.symlink or args.clone_from or args.clone_branch or args.ad if args.add_remote: add_remote(args.add_remote, args.destination[0]) - if args.update: + if type(args.update) == list: update(args.update, args.destination[0]) if args.push: