From 2cafb54498235527e082faba94340a39be36ebb2 Mon Sep 17 00:00:00 2001 From: RogerWork Date: Mon, 19 Feb 2024 09:45:04 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E6=89=A7=E8=A1=8Cgit?= =?UTF-8?q?=E5=91=BD=E4=BB=A4=E7=9A=84=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- update/utils/git_util.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update/utils/git_util.py b/update/utils/git_util.py index 25002bc..7f45d3f 100644 --- a/update/utils/git_util.py +++ b/update/utils/git_util.py @@ -152,8 +152,8 @@ class GitDbUtil: # 从git中获取版本列表后和数据库对比,添加新的版本到数据库 def set_release_to_db(self): local_repo = Repo(self.local_code_path) - local_repo.git.execute('git remote update origin --prune') # 更新远程列表 - local_repo.git.execute('git fetch --all') + local_repo.git.execute(command='git remote update origin --prune', shell=True) # 更新远程列表 + local_repo.git.execute(command='git fetch --all', shell=True) release = [] for remote in local_repo.remotes: for ref in remote.refs: