disable colors on pipe
This commit is contained in:
parent
483ba1299d
commit
19b42c21c7
1 changed files with 3 additions and 0 deletions
|
@ -9,8 +9,11 @@ from rscli.httputils import req
|
||||||
|
|
||||||
try:
|
try:
|
||||||
from colors import color
|
from colors import color
|
||||||
|
has_colors = True
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
has_colors = False
|
||||||
|
|
||||||
|
if not has_colors or not sys.stdout.isatty():
|
||||||
def color(text, *args, **kwargs):
|
def color(text, *args, **kwargs):
|
||||||
return text
|
return text
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue