Use Windows-specific Colorama initialisation (#12493)

Signed-off-by: James Knight <james.d.knight@live.com>
This commit is contained in:
James Knight 2024-07-02 16:17:09 -04:00 committed by GitHub
parent d2f1acc0ca
commit f0c5178176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -73,7 +73,7 @@ dependencies = [
"packaging>=21.0",
"importlib-metadata>=4.8; python_version < '3.10'",
"tomli>=2; python_version < '3.11'",
"colorama>=0.4.5; sys_platform == 'win32'",
"colorama>=0.4.6; sys_platform == 'win32'",
]
dynamic = ["version"]

View File

@ -93,7 +93,7 @@ def color_terminal() -> bool:
if 'NO_COLOR' in os.environ:
return False
if sys.platform == 'win32' and colorama is not None:
colorama.init()
colorama.just_fix_windows_console()
return True
if 'FORCE_COLOR' in os.environ:
return True