mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-05-10 11:45:53 +00:00
fix(cli): respect sys.stdout.isatty() in commands.py
This commit is contained in:
parent
88c619901e
commit
2e419f9ba2
@ -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,
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user