From fe9bcef676ce46a986b7b57bbfa00e7dcf91bb88 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 20 Jul 2023 08:36:26 -0300 Subject: [PATCH] Add support for printing the Python executable name in the upgrade message. # Aider chat conversation: --- aider/versioncheck.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aider/versioncheck.py b/aider/versioncheck.py index 68cdd59c7..472c1daf1 100644 --- a/aider/versioncheck.py +++ b/aider/versioncheck.py @@ -1,6 +1,8 @@ import requests import pkg_resources import aider +import sys +from pathlib import Path from aider.dump import dump @@ -14,7 +16,8 @@ def check_version(): return print(f"Running aider version {current_version}, newer version available: {latest_version}") - print("To upgrade, run: pip install --upgrade aider-chat") + py = Path(sys.executable).name + print(f"To upgrade, run: {py} -m pip install --upgrade aider-chat") if __name__ == "__main__": check_version()