Skip to content
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,9 @@ history.
is preserved and reported with manual reinstall guidance. Installer diagnostics
stay on stderr in JSON/NDJSON modes, which end with one success or error envelope.

- Desktop discovery reads both modern and legacy registries and keeps each registry's shared model roots with its own installs. The selected Desktop install is a registry-derived candidate (the only usable install, or the most recently launched); it is not matched to a running server.
- `comfy which` and `comfy env` report Desktop's split code, data and model roots without changing launch/install selection. On Linux, shared model roots are read from `settings.json` under `XDG_CONFIG_HOME`, where Desktop keeps it. A nonexistent selected workspace still exits 0 but reports `exists: false` and a `workspace_not_found` warning; discovery reports malformed or unreadable Desktop configuration, and Desktop paths that cannot be checked (permission denied, a symlink loop, no home directory), as `desktop_config_unreadable` warnings and marks inferred data roots as unverified. Both codes appear only in `data.warnings[]`; they are not error codes and `comfy discover` does not list them under `data.error_codes`.

- `comfy node deps` reports malformed installed package versions as `unknown`
consistently across supported `packaging` versions. One metadata probe
preserves raw installed versions with or without pip. Every `===` clause
Expand Down
18 changes: 14 additions & 4 deletions comfy_cli/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -2816,7 +2816,8 @@ def set_default(
@tracking.track_command()
def which():
renderer = get_renderer()
comfy_path = workspace_manager.workspace_path
workspace = workspace_manager.discovery_data()
comfy_path = workspace["path"]
if comfy_path is None:
renderer.error(
code="not_in_workspace",
Expand All @@ -2825,15 +2826,16 @@ def which():
)
raise typer.Exit(code=1)

workspace_type_value = (
workspace_manager.workspace_type.value if workspace_manager.workspace_type is not None else None
)
workspace_type_value = workspace["type"]
# A missing directory stays a success (exit 0, as in envelope/1 before):
# ``exists: false`` and a ``workspace_not_found`` warning say so.
if renderer.is_pretty():
import sys as _sys

from comfy_cli.env_checker import _display_url
from comfy_cli.local_address import resolve_local_host_port
from comfy_cli.output.panels import which_panel
from comfy_cli.output.sanitize import sanitize_value

host, port = resolve_local_host_port(None, None, background=ConfigManager().background)
try:
Expand All @@ -2849,12 +2851,17 @@ def which():
server_running=server_running,
server_url=_display_url(host, port),
version=ConfigManager().get_cli_version(),
desktop=workspace.get("desktop"),
)
)
for warning in workspace.get("warnings", []):
renderer.console().print(sanitize_value(warning["message"]), markup=False)
renderer.emit(
{
"workspace_path": str(comfy_path),
"workspace_type": workspace_type_value,
"exists": workspace["exists"],
**{key: workspace[key] for key in ("desktop", "warnings") if key in workspace},
},
command="which",
)
Expand Down Expand Up @@ -2934,6 +2941,9 @@ def env():
# JSON path: collect structured data without printing the table.
data = EnvChecker().fill_data()
data["workspace"] = workspace_manager.fill_data()
warnings = data["workspace"].pop("warnings", None)
if warnings:
data["warnings"] = warnings
renderer.emit(data, command="env")


Expand Down
Loading
Loading