mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Remove the win32 check, should be covered by color_terminal.
Add color_terminal check to quickstart.
This commit is contained in:
parent
a1d1f4ee73
commit
5f6352541b
@ -54,7 +54,7 @@ def main(argv=sys.argv):
|
||||
from sphinx.application import Sphinx, SphinxError
|
||||
from docutils.utils import SystemMessage
|
||||
|
||||
if not sys.stdout.isatty() or sys.platform == 'win32' or not color_terminal():
|
||||
if not sys.stdout.isatty() or not color_terminal():
|
||||
# Windows' poor cmd box doesn't understand ANSI sequences
|
||||
nocolor()
|
||||
|
||||
|
@ -15,7 +15,7 @@ from os import path
|
||||
TERM_ENCODING = getattr(sys.stdin, 'encoding', None)
|
||||
|
||||
from sphinx.util import make_filename
|
||||
from sphinx.util.console import purple, bold, red, turquoise, nocolor
|
||||
from sphinx.util.console import purple, bold, red, turquoise, nocolor, color_terminal
|
||||
from sphinx.util.texescape import tex_escape_map
|
||||
|
||||
|
||||
@ -380,7 +380,7 @@ def do_prompt(d, key, text, default=None, validator=nonempty):
|
||||
def inner_main(args):
|
||||
d = {}
|
||||
|
||||
if os.name == 'nt' or not sys.stdout.isatty():
|
||||
if not sys.stdout.isatty() or not color_terminal():
|
||||
nocolor()
|
||||
|
||||
print bold('Welcome to the Sphinx quickstart utility.')
|
||||
|
Loading…
Reference in New Issue
Block a user