Skip to content

Commit c7e6c99

Browse files
committed
don't fail silently
#46 (comment)
1 parent 708e4b4 commit c7e6c99

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

comfy_cli/command/custom_nodes/command.py

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -408,32 +408,29 @@ def uninstall(
408408

409409

410410
def update_node_id_cache():
411-
try:
412-
config_manager = ConfigManager()
413-
workspace_path = workspace_manager.workspace_path
411+
config_manager = ConfigManager()
412+
workspace_path = workspace_manager.workspace_path
414413

415-
cm_cli_path = os.path.join(
416-
workspace_path, "custom_nodes", "ComfyUI-Manager", "cm-cli.py"
417-
)
414+
cm_cli_path = os.path.join(
415+
workspace_path, "custom_nodes", "ComfyUI-Manager", "cm-cli.py"
416+
)
418417

419-
tmp_path = os.path.join(config_manager.get_config_path(), "tmp")
420-
if not os.path.exists(tmp_path):
421-
os.makedirs(tmp_path)
418+
tmp_path = os.path.join(config_manager.get_config_path(), "tmp")
419+
if not os.path.exists(tmp_path):
420+
os.makedirs(tmp_path)
422421

423-
cache_path = os.path.join(tmp_path, "node-cache.list")
424-
cmd = [sys.executable, cm_cli_path, "export-custom-node-ids", cache_path]
425-
426-
new_env = os.environ.copy()
427-
new_env["COMFYUI_PATH"] = workspace_path
428-
res = subprocess.run(cmd, env=new_env, check=True)
429-
if res.returncode != 0:
430-
typer.echo(
431-
"Failed to update node id cache.",
432-
err=True,
433-
)
434-
raise typer.Exit(code=1)
435-
except Exception:
436-
pass
422+
cache_path = os.path.join(tmp_path, "node-cache.list")
423+
cmd = [sys.executable, cm_cli_path, "export-custom-node-ids", cache_path]
424+
425+
new_env = os.environ.copy()
426+
new_env["COMFYUI_PATH"] = workspace_path
427+
res = subprocess.run(cmd, env=new_env, check=True)
428+
if res.returncode != 0:
429+
typer.echo(
430+
"Failed to update node id cache.",
431+
err=True,
432+
)
433+
raise typer.Exit(code=1)
437434

438435

439436
# `update, disable, enable, fix` allows `all` param

0 commit comments

Comments
 (0)