From 3e45ec0a089ea05ee94ede1b6ec00b2a769f70e8 Mon Sep 17 00:00:00 2001 From: Soulter <37870767+Soulter@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:44:47 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=83=AD=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=9A=84=E4=B8=80=E4=BA=9B=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/model/command/command.py b/model/command/command.py index 149bf1361..bffbc8ac9 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -44,7 +44,10 @@ class Command: else: if l[1] == "latest": try: - repo = Repo() + try: + repo = Repo() + except git.exc.InvalidGitRepositoryError: + repo = Repo(path="QQChannelChatGPT") repo.remotes.origin.pull() py = sys.executable os.execl(py, py, *sys.argv)