From 88cb31c06e21070394928be0317acb68957c7a09 Mon Sep 17 00:00:00 2001 From: Rock Chin <1010553892@qq.com> Date: Sun, 1 Jan 2023 20:46:25 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=AF=E6=8C=81=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/main.py b/main.py index 8c19f5df..d7835714 100644 --- a/main.py +++ b/main.py @@ -100,4 +100,13 @@ if __name__ == '__main__': init_db() sys.exit(0) + elif len(sys.argv) > 1 and sys.argv[1] == 'update': + try: + from dulwich import porcelain + repo = porcelain.open('.') + porcelain.pull(repo) + except ModuleNotFoundError: + print("dulwich模块未安装,请查看 https://github.com/RockChinQ/QChatGPT/issues/77") + sys.exit(0) + main()