From b2ba7d0b3c8b2bfc276a6e1ff9bb4f1b0561cd7e Mon Sep 17 00:00:00 2001 From: Robin Huang Date: Wed, 13 Nov 2024 14:18:59 -0800 Subject: [PATCH] Continue on update node cache error when installing ComfyUI-Manager (#208) * Add. * Catch errro.. * Update ruff. * Revert. --- comfy_cli/command/custom_nodes/command.py | 8 +------- comfy_cli/command/install.py | 5 ++++- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/comfy_cli/command/custom_nodes/command.py b/comfy_cli/command/custom_nodes/command.py index 50b4ef62..5972aa25 100644 --- a/comfy_cli/command/custom_nodes/command.py +++ b/comfy_cli/command/custom_nodes/command.py @@ -491,13 +491,7 @@ def update_node_id_cache(): new_env = os.environ.copy() new_env["COMFYUI_PATH"] = workspace_path - res = subprocess.run(cmd, env=new_env, check=True) - if res.returncode != 0: - typer.echo( - "Failed to update node id cache.", - err=True, - ) - raise typer.Exit(code=1) + subprocess.run(cmd, env=new_env, check=True) # `update, disable, enable, fix` allows `all` param diff --git a/comfy_cli/command/install.py b/comfy_cli/command/install.py index 4754ed28..9586dd2e 100644 --- a/comfy_cli/command/install.py +++ b/comfy_cli/command/install.py @@ -251,7 +251,10 @@ def execute( depComp.install_deps() if not skip_manager: - update_node_id_cache() + try: + update_node_id_cache() + except subprocess.CalledProcessError as e: + rprint(f"Failed to update node id cache: {e}") os.chdir(repo_dir)