chore: make cprint write to stderr (#2250)

Also do sys.exit(1) in case of errors
This commit is contained in:
raghotham 2025-05-24 23:39:57 -07:00 committed by GitHub
parent c25bd0ad58
commit 5a422e236c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 81 additions and 44 deletions

View file

@ -6,6 +6,7 @@
import importlib.resources
import logging
import sys
from pathlib import Path
from pydantic import BaseModel
@ -95,10 +96,11 @@ def print_pip_install_help(config: BuildConfig):
cprint(
f"Please install needed dependencies using the following commands:\n\nuv pip install {' '.join(normal_deps)}",
"yellow",
color="yellow",
file=sys.stderr,
)
for special_dep in special_deps:
cprint(f"uv pip install {special_dep}", "yellow")
cprint(f"uv pip install {special_dep}", color="yellow", file=sys.stderr)
print()