We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b3812f7 commit 2a700cfCopy full SHA for 2a700cf
sphinx/util/console.py
@@ -57,9 +57,13 @@ def term_width_line(text: str) -> str:
57
58
59
def color_terminal() -> bool:
60
+ if 'NO_COLOR' in os.environ:
61
+ return False
62
if sys.platform == 'win32' and colorama is not None:
63
colorama.init()
64
return True
65
+ if 'FORCE_COLOR' in os.environ:
66
+ return True
67
if not hasattr(sys.stdout, 'isatty'):
68
return False
69
if not sys.stdout.isatty():
0 commit comments