From 5d34e76aa0ffb0d387c87b81dcc1285ac4adb3d8 Mon Sep 17 00:00:00 2001 From: "Dr.Lt.Data" Date: Sat, 21 Mar 2026 09:20:18 +0900 Subject: [PATCH] fix(git_helper): surface git stderr and use portable exit code - Redirect exception output to stderr for diagnostic visibility - Surface GitCommandError.stderr when available - Use sys.exit(1) instead of sys.exit(-1) for portable exit codes - Remove debug print statements --- comfyui_manager/common/git_helper.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/comfyui_manager/common/git_helper.py b/comfyui_manager/common/git_helper.py index b097ba96..c8ae6cb2 100644 --- a/comfyui_manager/common/git_helper.py +++ b/comfyui_manager/common/git_helper.py @@ -50,9 +50,6 @@ working_directory = os.getcwd() if os.path.basename(working_directory) != 'custom_nodes': print("WARN: This script should be executed in custom_nodes dir") - print(f"DBG: INFO {working_directory}") - print(f"DBG: INFO {sys.argv}") - # exit(-1) class GitProgress(RemoteProgress): @@ -557,7 +554,9 @@ try: restore_pip_snapshot(pips, options) sys.exit(0) except Exception as e: - print(e) - sys.exit(-1) + print(e, file=sys.stderr) + if hasattr(e, 'stderr') and e.stderr: + print(e.stderr, file=sys.stderr) + sys.exit(1)