mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-22 13:15:44 -05:00
main.py: default colors to isatty(stdout) if force_colors is None
This commit is contained in:
parent
578a6ce3e5
commit
791e4d69ac
1 changed files with 3 additions and 1 deletions
4
main.py
4
main.py
|
@ -3,6 +3,7 @@
|
|||
import click
|
||||
import subprocess
|
||||
|
||||
from os import isatty
|
||||
from traceback import format_exc, format_exception_only, format_tb
|
||||
from typing import Optional
|
||||
|
||||
|
@ -36,7 +37,8 @@ def cli(
|
|||
force_progress_bars: Optional[bool] = None,
|
||||
):
|
||||
setup_logging(verbose, force_colors=force_colors)
|
||||
config.runtime.colors = force_colors
|
||||
# stdout is fd 1
|
||||
config.runtime.colors = isatty(1) if force_colors is None else force_colors
|
||||
config.runtime.verbose = verbose
|
||||
config.runtime.progress_bars = force_progress_bars
|
||||
config.runtime.no_wrap = wrapper_override is False
|
||||
|
|
Loading…
Add table
Reference in a new issue