From be8038d39820eeea4c240b405c9609f21d6f55cb Mon Sep 17 00:00:00 2001 From: HeXiangLong <3234374354@qq.com> Date: Tue, 8 Apr 2025 22:35:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E4=BB=A3=E7=A0=81=E5=90=8C=E6=AD=A5?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=B8=AD=E6=B7=BB=E5=8A=A0=202=20=E7=A7=92?= =?UTF-8?q?=E7=9A=84=E7=AD=89=E5=BE=85=E6=97=B6=E9=97=B4=EF=BC=8C=E4=BB=A5?= =?UTF-8?q?=E7=A1=AE=E4=BF=9D=E7=A8=8B=E5=BA=8F=E5=B9=B3=E7=A8=B3=E9=87=8D?= =?UTF-8?q?=E5=90=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/main.py b/main.py index 0aa0fc1..6ff5deb 100644 --- a/main.py +++ b/main.py @@ -82,10 +82,12 @@ def pseudo_zsh(): if args[0] == 'update': try: + print("Updating code...") subprocess.run(['git', 'pull']) subprocess.run(['git', 'push']) print("Code synchronized successfully.") print("Restarting the program...") + time.sleep(2) # 等待 2 秒 os.execv(sys.executable, ['python3'] + sys.argv) # 重新运行程序 except Exception as e: print(f"Error during update: {e}")