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.
This commit is contained in:
Zachary Vorhies 2024-01-22 18:52:06 -08:00 committed by GitHub
parent 009c5c3c0d
commit c6ced90e51
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)