mirror of https://github.com/cheat/cheat.git
Fix problems with CHEATCOLORS behaviour
This commit is contained in:
parent
4d19505b79
commit
8a8f30679d
|
@ -33,7 +33,8 @@ class Utils:
|
||||||
""" Colorizes cheatsheet content if so configured """
|
""" Colorizes cheatsheet content if so configured """
|
||||||
|
|
||||||
# only colorize if configured to do so, and if stdout is a tty
|
# only colorize if configured to do so, and if stdout is a tty
|
||||||
if not self._displaycolors or not sys.stdout.isatty():
|
if (self._displaycolors not in ["True", "true", "1", 1] or
|
||||||
|
not sys.stdout.isatty()):
|
||||||
return sheet_content
|
return sheet_content
|
||||||
|
|
||||||
# don't attempt to colorize an empty cheatsheet
|
# don't attempt to colorize an empty cheatsheet
|
||||||
|
|
Loading…
Reference in New Issue