fix: Correct the version check logic to only check for version updates after 24 hours

This commit is contained in:
Paul Gauthier 2024-08-27 08:43:33 -07:00 committed by Paul Gauthier (aider)
parent 742cddec02
commit 8f773eb3a6

View file

@ -27,7 +27,7 @@ def check_version(io, just_check=False, verbose=False):
if not just_check and fname.exists():
day = 60 * 60 * 24
since = time.time() - fname.stat().st_mtime
if since < day:
if 0 < since < day:
if verbose:
hours = since / 60 / 60
io.tool_output(f"Too soon to check version: {hours:.1f} hours")