Commits

Michael Forbes  committed b386cfc Merge

Merged original

  • Participants
  • Parent commits 8a3eaf1, 2f0924a
  • Branches original

Comments (0)

Files changed (1)

File sphinx/cmdline.py

 from sphinx.errors import SphinxError
 from sphinx.application import Sphinx
 from sphinx.util import Tee, format_exception_cut_frames, save_traceback
-from sphinx.util.console import red, nocolor, init_color
+from sphinx.util.console import red, nocolor, color_terminal
 
 
 def usage(argv, msg=None):
 
 
 def main(argv):
-    init_color()
+    if not color_terminal():
+        # Windows' poor cmd box doesn't understand ANSI sequences
+        nocolor()
+
     try:
         opts, args = getopt.getopt(argv[1:], 'ab:t:d:c:CD:A:ng:NEqQWw:P')
         allopts = set(opt[0] for opt in opts)