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
This commit is contained in:
rchandia@google.com 2011-10-07 18:06:23 +00:00
parent 51bfa4841e
commit 770771127b

View file

@ -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;
}
/**