From c6ced90e51c0c3c9b085ae14fbc505804cf1e568 Mon Sep 17 00:00:00 2001 From: Zachary Vorhies Date: Mon, 22 Jan 2024 18:52:06 -0800 Subject: [PATCH] fix https://github.com/paul-gauthier/aider/issues/452 Adds option to skip the check for an update, better supports tooling which wants to do it's own update mechanism and not have aider print it out unconditionally. --- aider/main.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index be7c51a47..93555117c 100644 --- a/aider/main.py +++ b/aider/main.py @@ -361,6 +361,11 @@ def main(argv=None, input=None, output=None, force_git_root=None): help="Check for updates and return status in the exit code", default=False, ) + other_group.add_argument( + "--skip-check-update", + action="store_true", + help="Skips checking for the update when the program runs", + ) other_group.add_argument( "--apply", metavar="FILE", @@ -478,7 +483,8 @@ def main(argv=None, input=None, output=None, force_git_root=None): io.tool_output(f"Aider v{__version__}") - check_version(io.tool_error) + if not args.skip_check_update: + check_version(io.tool_error) if args.check_update: update_available = check_version(lambda msg: None)