fix(manager_core): capture stderr in run_script for git clone diagnostics

run_script() used subprocess.check_call which discards stderr entirely.
On Windows, git_helper.py's git clone failure (exit 128) produced no
visible error message because stderr was never captured or forwarded.

Changed to subprocess.run with capture_output=True so git's actual
fatal message (e.g. "destination path already exists") is visible
in comfy-cli CI logs.
This commit is contained in:
Dr.Lt.Data 2026-03-21 13:17:34 +09:00
parent 58debee9cf
commit 324851f146

View File

@ -1659,7 +1659,13 @@ class ManagerFuncs:
print(f"[ComfyUI-Manager] Unexpected behavior: `{cmd}`")
return 0
subprocess.check_call(cmd, cwd=cwd, env=get_script_env())
result = subprocess.run(cmd, cwd=cwd, env=get_script_env(), capture_output=True, text=True)
if result.stdout:
print(result.stdout, end='')
if result.stderr:
print(result.stderr, end='', file=sys.stderr)
if result.returncode != 0:
raise subprocess.CalledProcessError(result.returncode, cmd, output=result.stdout, stderr=result.stderr)
return 0