mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 21:10:22 +00:00
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:
parent
51bfa4841e
commit
770771127b
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue