File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 66import argparse
77import inspect
88import logging
9+ import os
910import pathlib
1011import sys
1112import typing
@@ -70,14 +71,20 @@ def __init__(self, parser: Parser):
7071 "exit-failure" : "bold red" ,
7172 }
7273 )
73- self .console = Console (stderr = True , theme = theme )
74+ console_kwargs = {
75+ "theme" : theme ,
76+ }
77+ if os .environ .get ("CI" ):
78+ console_kwargs ["force_terminal" ] = True
79+ console_kwargs ["force_interactive" ] = False
80+ self .console = Console (sterr = True , ** console_kwargs )
81+ self .console_stdout = Console (** console_kwargs )
7482
7583 def print (self , * args , ** kwargs ):
7684 """
7785 Print to stdout.
7886 """
79- with self .console .screen (stderr = False ) as console :
80- console .print (* args , ** kwargs )
87+ self .console_stdout .print (* args , ** kwargs )
8188
8289 def debug (self , * args ):
8390 """
You can’t perform that action at this time.
0 commit comments