From 0515dc084246e7bb3e79f077e1bf17d5787aa45f Mon Sep 17 00:00:00 2001 From: Menno van Leeuwen Date: Tue, 11 Mar 2025 19:17:34 +0100 Subject: [PATCH] feat: remove git update option from update script and ensure repository check is always performed --- bin/actions/update.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/bin/actions/update.py b/bin/actions/update.py index d0a5c24..b5028f1 100755 --- a/bin/actions/update.py +++ b/bin/actions/update.py @@ -17,7 +17,6 @@ def help_message(): printfe("green", " --ansible, -A Upgrade Ansible packages.") printfe("green", " --ansible-verbose Upgrade Ansible packages with verbose output. (-vvv)") printfe("green", " --full-speed, -F Upgrade packages and use all available cores for compilation. (Default: 8 cores)") - printfe("green", " --git, -G Check and update dotfiles Git repository.") printfe("green", " --help, -h Display this help message.") return 0 @@ -174,7 +173,6 @@ def main(): parser.add_argument("--ansible", "-A", action="store_true", help="Upgrade Ansible packages") parser.add_argument("--ansible-verbose", action="store_true", help="Upgrade Ansible packages with verbose output") parser.add_argument("--full-speed", "-F", action="store_true", help="Use all available cores") - parser.add_argument("--git", "-G", action="store_true", help="Check and update dotfiles Git repository") parser.add_argument("--help", "-h", action="store_true", help="Display help message") args = parser.parse_args() @@ -183,21 +181,19 @@ def main(): return help_message() # If no specific option provided, run all - if not args.ha and not args.ansible and not args.ansible_verbose and not args.git: + if not args.ha and not args.ansible and not args.ansible_verbose: args.ha = True args.ansible = True - args.git = True - - # Git repository update - if args.git: - if not check_git_repository(): - printfe("red", "Failed to check or update dotfiles repository.") - return 1 # If ansible_verbose is set, also set ansible if args.ansible_verbose: args.ansible = True + # Always check git repository first + if not check_git_repository(): + printfe("red", "Failed to check or update dotfiles repository.") + return 1 + # Set cores and jobs based on full-speed flag if args.full_speed: import multiprocessing