mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-04-09 18:07:52 +08:00
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:
parent
58debee9cf
commit
324851f146
@ -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
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user