[Bugfix] Fix missing ANSI colors in CLI logo when output is piped (#1636)

Signed-off-by: Lidang-Jiang <lidangjiang@gmail.com>
This commit is contained in:
Lidang Jiang authored and GitHub committed 2026-05-06 15:43:19 +00:00
1 parent 576afb6f53
commit b8bd75837e
2 files changed
+17 -2

No files matched your search

+8
View File
@@ -15,6 +15,14 @@ def main():
vllm_main()
return
else:
# Force colored logging even when piped (e.g. `| tee`).
# Must be set before any vLLM import because the logger
# formatter is configured at import time via _use_color().
import os
if "VLLM_LOGGING_COLOR" not in os.environ:
os.environ["VLLM_LOGGING_COLOR"] = "1"
from vllm.entrypoints.utils import VLLM_SUBCMD_PARSER_EPILOG, cli_env_setup
from vllm.utils.argparse_utils import FlexibleArgumentParser