fix: robust checkout ComfyUI's master branch

https://github.com/ltdrdata/ComfyUI-Manager/issues/1392
This commit is contained in:
Dr.Lt.Data 2025-01-06 22:26:50 +09:00
parent 87eadb4825
commit 9f5b0c9ddd
3 changed files with 6 additions and 6 deletions

View File

@ -135,9 +135,9 @@ def switch_to_default_branch(repo):
repo.git.checkout(repo.heads.master)
except:
try:
repo.git.checkout(repo.heads.main)
repo.git.checkout('-b', 'master', 'origin/master')
except:
print("[ComfyUI Manager] Failed to switch to the default branch (master or main)")
print("[ComfyUI Manager] Failed to switch to the default branch")
def gitpull(path):

View File

@ -41,7 +41,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 3, 12]
version_code = [3, 3, 13]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
@ -1527,9 +1527,9 @@ def switch_to_default_branch(repo):
repo.git.checkout(repo.heads.master)
except:
try:
repo.git.checkout(repo.heads.main)
repo.git.checkout('-b', 'master', 'origin/master')
except:
print("[ComfyUI Manager] Failed to switch to the default branch (master or main)")
print("[ComfyUI Manager] Failed to switch to the default branch")
def try_install_script(url, repo_path, install_cmd, instant_execution=False):

View File

@ -1,7 +1,7 @@
[project]
name = "comfyui-manager"
description = "ComfyUI-Manager provides features to install and manage custom nodes for ComfyUI, as well as various functionalities to assist with ComfyUI."
version = "3.3.12"
version = "3.3.13"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions"]