Skip to content

Commit 90ba8c6

Browse files
committed
fix(git_helper): use sys.exit(1) and stderr for module-level validation errors
- exit(-1) → sys.exit(1): Windows displays -1 as unsigned 4294967295 - print() → print(file=sys.stderr): error messages belong on stderr - Add f-string prefix to COMFYUI_PATH error message (variable was not interpolated)
1 parent 0dde750 commit 90ba8c6

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

comfyui_manager/common/git_helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
git_exe_path = os.environ.get('GIT_EXE_PATH')
1616

1717
if comfy_path is None:
18-
print("git_helper: environment variable 'COMFYUI_PATH' is not specified.")
19-
exit(-1)
18+
print("git_helper: environment variable 'COMFYUI_PATH' is not specified.", file=sys.stderr)
19+
sys.exit(1)
2020

2121
if not os.path.exists(os.path.join(comfy_path, 'folder_paths.py')):
22-
print("git_helper: '{comfy_path}' is not a valid 'COMFYUI_PATH' location.")
23-
exit(-1)
22+
print(f"git_helper: '{comfy_path}' is not a valid 'COMFYUI_PATH' location.", file=sys.stderr)
23+
sys.exit(1)
2424

2525
def download_url(url, dest_folder, filename=None):
2626
# Ensure the destination folder exists

0 commit comments

Comments
 (0)