changeset 30367:e193870eb680

color: show mode warning based on ui.formatted ui.interactive is only for input and ui.formatted is for output.
author Xidorn Quan <me@upsuper.org>
date Fri, 11 Nov 2016 13:06:05 +1100
parents 038547a14d85
children ed45283a0ca7
files hgext/color.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/color.py	Thu Nov 10 15:14:05 2016 -0500
+++ b/hgext/color.py	Fri Nov 11 13:06:05 2016 +1100
@@ -275,8 +275,8 @@
 
     def modewarn():
         # only warn if color.mode was explicitly set and we're in
-        # an interactive terminal
-        if mode == realmode and ui.interactive():
+        # a formatted terminal
+        if mode == realmode and ui.formatted():
             ui.warn(_('warning: failed to set color mode to %s\n') % mode)
 
     if realmode == 'win32':