@ -1549,11 +1549,11 @@ def save_active_platforms(apnames, ap):
def no_verbose ( sys , env ) :
# If the output is not a terminal, do nothing
if not sys . stdout . isatty ( ) :
return
colors = { }
# Colors are disabled in non-TTY environments such as pipes. This means
# that if output is redirected to a file, it will not contain color codes
if sys . stdout . isatty ( ) :
colors [ ' cyan ' ] = ' \033 [96m '
colors [ ' purple ' ] = ' \033 [95m '
colors [ ' blue ' ] = ' \033 [94m '
@ -1561,6 +1561,14 @@ def no_verbose(sys, env):
colors [ ' yellow ' ] = ' \033 [93m '
colors [ ' red ' ] = ' \033 [91m '
colors [ ' end ' ] = ' \033 [0m '
else :
colors [ ' cyan ' ] = ' '
colors [ ' purple ' ] = ' '
colors [ ' blue ' ] = ' '
colors [ ' green ' ] = ' '
colors [ ' yellow ' ] = ' '
colors [ ' red ' ] = ' '
colors [ ' end ' ] = ' '
compile_source_message = ' %s Compiling %s ==> %s $SOURCE %s ' % ( colors [ ' blue ' ] , colors [ ' purple ' ] , colors [ ' yellow ' ] , colors [ ' end ' ] )
java_compile_source_message = ' %s Compiling %s ==> %s $SOURCE %s ' % ( colors [ ' blue ' ] , colors [ ' purple ' ] , colors [ ' yellow ' ] , colors [ ' end ' ] )