From ad4bf5e654bd5e732b6a2c0b785cff5fe80a0f7f Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Sun, 11 Jun 2023 09:53:49 +0800 Subject: [PATCH] perf: update command add "update latest r" --- model/command/command.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/model/command/command.py b/model/command/command.py index c072e9c72..6aa84c816 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -411,6 +411,10 @@ class Command: pash_tag = "QQChannelChatGPT"+os.sep repo.remotes.origin.pull() + if len(l) == 3 and l[2] == "r": + py = sys.executable + os.execl(py, py, *sys.argv) + return True, "更新成功~是否重启?输入update r重启(重启指令不返回任何确认信息)。", "update" except BaseException as e: