Minor, add system property to suppress color output in CLI

This commit is contained in:
Alexander Udalov
2016-01-13 14:24:10 +03:00
parent c3cce53aa2
commit b0627b4ce6
@@ -34,6 +34,7 @@ public abstract class PlainTextMessageRenderer implements MessageRenderer {
// TODO: investigate why ANSI escape codes on Windows only work in REPL for some reason
private static final boolean COLOR_ENABLED =
!SystemInfo.isWindows &&
!"false".equals(System.getProperty("kotlin.colors.enabled")) &&
CLibrary.isatty(CLibrary.STDERR_FILENO) != 0;
private static final String LINE_SEPARATOR = LineSeparator.getSystemLineSeparator().getSeparatorString();