log.py, minimal/do: don't use ansi colour codes if $TERM is blank or 'dumb'
Apparently emacs sets TERM=dumb in its tty simulator, so even though isatty() returns true, we shouldn't use colour codes. (emacs is therefore lame. But we knew that.)
This commit is contained in:
parent
cb1512b14b
commit
f6ea1fd76b
2 changed files with 2 additions and 2 deletions
|
|
@ -12,7 +12,7 @@ GREEN=""
|
|||
BOLD=""
|
||||
PLAIN=""
|
||||
|
||||
if tty <&2 >/dev/null 2>&1; then
|
||||
if [ -n "$TERM" -a "$TERM" != "dumb" ] && tty <&2 >/dev/null 2>&1; then
|
||||
GREEN="$(printf '\033[32m')"
|
||||
BOLD="$(printf '\033[1m')"
|
||||
PLAIN="$(printf '\033[m')"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue