modified: better error log when failed to update comfyui

https://github.com/ltdrdata/ComfyUI-Manager/issues/1576
This commit is contained in:
Dr.Lt.Data 2025-03-02 17:42:31 +09:00
parent 6969557693
commit e71e68e298
4 changed files with 13 additions and 6 deletions

View File

@ -42,7 +42,7 @@ import manager_downloader
from node_package import InstalledNodePackage
version_code = [3, 27, 5]
version_code = [3, 27, 6]
version_str = f"V{version_code[0]}.{version_code[1]}" + (f'.{version_code[2]}' if len(version_code) > 2 else '')
@ -2399,7 +2399,14 @@ def gitclone_update(files, instant_execution=False, skip_script=False, msg_prefi
def update_to_stable_comfyui(repo_path):
try:
repo = git.Repo(repo_path)
repo.git.checkout(repo.heads.master)
try:
repo.git.checkout(repo.heads.master)
except:
logging.error(f"[ComfyUI-Manager] Failed to checkout 'master' branch.\nrepo_path={repo_path}\nAvailable branches:")
for branch in repo.branches:
logging.error('\t'+branch.name)
return "fail", None
versions, current_tag, _ = get_comfyui_versions(repo)
if len(versions) == 0 or (len(versions) == 1 and versions[0] == 'nightly'):

View File

@ -467,8 +467,8 @@ async def task_worker():
res = core.update_path(repo_path)
if res == "fail":
logging.error("ComfyUI update fail: The installed ComfyUI does not have a Git repository.")
return "The installed ComfyUI does not have a Git repository."
logging.error("ComfyUI update failed")
return "fail"
elif res == "updated":
if is_stable:
logging.info("ComfyUI is updated to latest stable version.")

View File

@ -689,7 +689,7 @@ async function onQueueStatus(event) {
let msg = "";
if(success_list.length == 0 && !comfyui_state.startsWith('success')) {
if(success_list.length == 0 && comfyui_state.startsWith('skip')) {
if(failed_list.length == 0) {
msg += "You are already up to date.";
}

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.27.5"
version = "3.27.6"
license = { file = "LICENSE.txt" }
dependencies = ["GitPython", "PyGithub", "matrix-client==0.4.0", "transformers", "huggingface-hub>0.20", "typer", "rich", "typing-extensions", "toml", "uv", "chardet"]