1. SHIBUKAWA Yoshiki
  2. sphinx

Commits

georg.brandl  committed 1f22e25

Don't color output if stdout is not a tty.

  • Participants
  • Parent commits 9e7b542
  • Branches default

Comments (0)

Files changed (1)

File sphinx/__init__.py

View file
  • Ignore whitespace
         elif opt == '-N':
             nocolor()
 
-    if sys.platform == 'win32':
+    if not sys.stdout.isatty() or sys.platform == 'win32':
         # Windows' cmd box doesn't understand ANSI sequences
         nocolor()