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 6
6
import argparse
7
7
import inspect
8
8
import logging
9
+ import os
9
10
import pathlib
10
11
import sys
11
12
import typing
@@ -70,14 +71,20 @@ def __init__(self, parser: Parser):
70
71
"exit-failure" : "bold red" ,
71
72
}
72
73
)
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 )
74
82
75
83
def print (self , * args , ** kwargs ):
76
84
"""
77
85
Print to stdout.
78
86
"""
79
- with self .console .screen (stderr = False ) as console :
80
- console .print (* args , ** kwargs )
87
+ self .console_stdout .print (* args , ** kwargs )
81
88
82
89
def debug (self , * args ):
83
90
"""
You can’t perform that action at this time.
0 commit comments