mirror of
https://github.com/mkdocs/mkdocs.git
synced 2026-03-27 09:58:31 +07:00
Depend on 'colorama' on Windows to fix color output in terminal (#2606)
Adding the explicit dependency, because 1. 'click' prior to v8.0 did not have this dependency, it was used "only if present" 2. We *are* importing it, let's declare it as such
This commit is contained in:
@@ -12,6 +12,15 @@ from mkdocs import utils
|
||||
from mkdocs import config
|
||||
from mkdocs.commands import build, gh_deploy, new, serve
|
||||
|
||||
|
||||
if sys.platform.startswith("win"):
|
||||
try:
|
||||
import colorama
|
||||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
colorama.init()
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
||||
@@ -12,3 +12,4 @@ mkdocs-redirects==1.0.1
|
||||
importlib_metadata==3.10.0
|
||||
packaging==20.5
|
||||
mergedeep==1.3.4
|
||||
colorama==0.4; platform_system == 'Windows'
|
||||
|
||||
@@ -12,3 +12,4 @@ mkdocs-redirects>=1.0.1
|
||||
importlib_metadata>=3.10
|
||||
packaging>=20.5
|
||||
mergedeep>=1.3.4
|
||||
colorama>=0.4; platform_system == 'Windows'
|
||||
|
||||
Reference in New Issue
Block a user