mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Use Windows-specific Colorama initialisation (#12493)
Signed-off-by: James Knight <james.d.knight@live.com>
This commit is contained in:
parent
d2f1acc0ca
commit
f0c5178176
@ -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"]
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user