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):