Bug 1319166 - Don't automatically enable color in iTerm2; r?glandium draft
authorGregory Szorc <gps@mozilla.com>
Mon, 21 Nov 2016 22:37:01 -0800
changeset 442534 b65147492485d5813c47ad8af23ffc2dd63fc1b5
parent 442068 0534254e9a40b4bade2577c631fe4cfa0b5db41d
child 537815 f76463f90a536b17cc46d58014268150e316594c
push id36722
push userbmo:gps@mozilla.com
push dateTue, 22 Nov 2016 17:48:43 +0000
reviewersglandium
bugs1319166
milestone53.0a1
Bug 1319166 - Don't automatically enable color in iTerm2; r?glandium iTerm2 interprets the byte sequence "ESC [ 2 i" as a request to open a print dialog. This sequence can get emitted when printing colorized compiler output. Until we figure out a workaround, disable automatic coloring on iTerm2 so developers aren't annoyed. MozReview-Commit-ID: 3Be4YgArg4k
config/config.mk
--- a/config/config.mk
+++ b/config/config.mk
@@ -356,19 +356,24 @@ color_flags_vars := \
   COMPILE_CMMFLAGS \
   HOST_CFLAGS \
   HOST_CXXFLAGS \
   LDFLAGS \
   $(NULL)
 
 ifdef MACH_STDOUT_ISATTY
 ifdef COLOR_CFLAGS
+# TODO Bug 1319166 - iTerm2 interprets some bytes  sequences as a
+# request to show a print dialog. Don't enable color on iTerm2 until
+# a workaround is in place.
+ifneq ($(TERM_PROGRAM),iTerm.app)
 $(foreach var,$(color_flags_vars),$(eval $(call colorize_flags,$(var))))
 endif
 endif
+endif
 
 #
 # Name of the binary code directories
 #
 # Override defaults
 
 SDK_LIB_DIR = $(DIST)/sdk/lib
 SDK_BIN_DIR = $(DIST)/sdk/bin