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}")