fix(cli): respect sys.stdout.isatty() in commands.py

This commit is contained in:
wood3n 2026-04-21 13:34:18 -07:00 committed by Xubin Ren
parent 88c619901e
commit 2e419f9ba2

View File

@ -145,7 +145,7 @@ def _make_console() -> Console:
def _render_interactive_ansi(render_fn) -> str: def _render_interactive_ansi(render_fn) -> str:
"""Render Rich output to ANSI so prompt_toolkit can print it safely.""" """Render Rich output to ANSI so prompt_toolkit can print it safely."""
ansi_console = Console( ansi_console = Console(
force_terminal=True, force_terminal=sys.stdout.isatty(),
color_system=console.color_system or "standard", color_system=console.color_system or "standard",
width=console.width, width=console.width,
) )