Fix issue #33 - no color output expected when redirecting stdout

This commit is contained in:
clach04 2023-06-04 16:23:32 -07:00 committed by ed
parent 9f122ccd16
commit 2acdf685b1

View file

@ -33,6 +33,7 @@ WINDOWS: Any = (
VT100 = "--ansi" in sys.argv or (
os.environ.get("NO_COLOR", "").lower() in ("", "0", "false")
and sys.stdout.isatty()
and "--no-ansi" not in sys.argv
and (not WINDOWS or WINDOWS >= [10, 0, 14393])
)