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 GitHub
parent df5d309d6e
commit 762ef06b33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -31,6 +31,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])
)