mirror of
https://github.com/Comfy-Org/ComfyUI-Manager.git
synced 2026-04-13 03:42:30 +08:00
fix(git_helper): surface git stderr on clone failure for diagnostics
When git clone fails with exit 128 on Windows, the actual git error (e.g. "fatal: destination path already exists") is hidden inside GitPython's GitCommandError.stderr. Catch this specifically in gitclone() and print e.stderr to sys.stderr before re-raising, so the actual cause is visible in CI logs and parent process output. No behavioral change — progress=GitProgress() is preserved as-is.
This commit is contained in:
parent
099aed1ad4
commit
58debee9cf
@ -101,7 +101,13 @@ def gitclone(custom_nodes_path, url, target_hash=None, repo_path=None):
|
|||||||
repo_path = os.path.join(custom_nodes_path, repo_name)
|
repo_path = os.path.join(custom_nodes_path, repo_name)
|
||||||
|
|
||||||
# Clone the repository from the remote URL
|
# Clone the repository from the remote URL
|
||||||
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress())
|
try:
|
||||||
|
repo = git.Repo.clone_from(url, repo_path, recursive=True, progress=GitProgress())
|
||||||
|
except git.GitCommandError as e:
|
||||||
|
print(f"git clone failed for '{url}': {e}", file=sys.stderr)
|
||||||
|
if e.stderr:
|
||||||
|
print(e.stderr, file=sys.stderr)
|
||||||
|
raise
|
||||||
|
|
||||||
if target_hash is not None:
|
if target_hash is not None:
|
||||||
print(f"CHECKOUT: {repo_name} [{target_hash}]")
|
print(f"CHECKOUT: {repo_name} [{target_hash}]")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user