From 58debee9cf3dc3a4c500fc8859e65912d90261f9 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 21 Mar 2026 10:18:50 +0900 Subject: [PATCH] fix(git_helper): surface git stderr on clone failure for diagnostics MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- comfyui_manager/common/git_helper.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/comfyui_manager/common/git_helper.py b/comfyui_manager/common/git_helper.py index c8ae6cb2..1897ee20 100644 --- a/comfyui_manager/common/git_helper.py +++ b/comfyui_manager/common/git_helper.py @@ -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) # 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: print(f"CHECKOUT: {repo_name} [{target_hash}]")