diff --git a/core/src/com/google/inject/internal/InternalFlags.java b/core/src/com/google/inject/internal/InternalFlags.java index c6de91baa6..566eaac8f3 100644 --- a/core/src/com/google/inject/internal/InternalFlags.java +++ b/core/src/com/google/inject/internal/InternalFlags.java @@ -122,7 +122,8 @@ public enum ColorizeOption { AUTO { @Override boolean enabled() { - return System.console() != null && System.getenv("TERM") != null; + boolean systemConsoleIsTerminal = System.console() != null; + return systemConsoleIsTerminal && System.getenv("TERM") != null; } }, ON {