Fix issue #33 - no color output expected when redirecting stdout
This commit is contained in:
parent
9f122ccd16
commit
2acdf685b1
@ -33,6 +33,7 @@ WINDOWS: Any = (
|
|||||||
|
|
||||||
VT100 = "--ansi" in sys.argv or (
|
VT100 = "--ansi" in sys.argv or (
|
||||||
os.environ.get("NO_COLOR", "").lower() in ("", "0", "false")
|
os.environ.get("NO_COLOR", "").lower() in ("", "0", "false")
|
||||||
|
and sys.stdout.isatty()
|
||||||
and "--no-ansi" not in sys.argv
|
and "--no-ansi" not in sys.argv
|
||||||
and (not WINDOWS or WINDOWS >= [10, 0, 14393])
|
and (not WINDOWS or WINDOWS >= [10, 0, 14393])
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user