From 770771127bad59b6384c5de4e9a995f5dcc05bb8 Mon Sep 17 00:00:00 2001 From: "rchandia@google.com" Date: Fri, 7 Oct 2011 18:06:23 +0000 Subject: [PATCH] Deactivates ANSI colors on errors for non-interactive consoles R=zundel@google.com BUG= TEST= Review URL: https://chromereviews.googleplex.com/3572015 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@245 260f80e4-7a28-3924-810f-c04153c831b5 --- .../com/google/dart/compiler/DefaultDartCompilerListener.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java index ccc2e89460c..ceffa199d9f 100644 --- a/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java +++ b/compiler/java/com/google/dart/compiler/DefaultDartCompilerListener.java @@ -50,7 +50,7 @@ public class DefaultDartCompilerListener extends DartCompilerListener { } private boolean useColor() { - return String.valueOf(System.getenv("TERM")).startsWith("xterm"); + return String.valueOf(System.getenv("TERM")).startsWith("xterm") && System.console() != null; } /**