Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1254)

Unified Diff: dart/utils/compiler/build_helper.dart

Issue 10860041: Disable colors on Windows and non-ttys. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/utils/compiler/build_helper.dart
diff --git a/dart/utils/compiler/build_helper.dart b/dart/utils/compiler/build_helper.dart
index 0697624f94a96c0058c0473df9ad3d9387645e1d..27dd650107fd9e3b1ecf9f867f85b0eb3305e86d 100644
--- a/dart/utils/compiler/build_helper.dart
+++ b/dart/utils/compiler/build_helper.dart
@@ -103,7 +103,12 @@ List<String> buildScript(String name,
# BSD-style license that can be found in the LICENSE file.
BIN_DIR=`dirname \$0`
-exec \$BIN_DIR/dart$options \$BIN_DIR/$path "\$@"
+NO_COLORS="--no-colors"
+if test -t 1; then
+ # Enable colors if stdout is a terminal.
+ unset NO_COLORS
+fi
+exec \$BIN_DIR/dart$options \$BIN_DIR/$path \$NO_COLORS "\$@"
''',
'''
@echo off
@@ -118,6 +123,6 @@ if %SCRIPTPATH:~-1%==\ set SCRIPTPATH=%SCRIPTPATH:~0,-1%
set arguments=%*
-"%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" %arguments%
+"%SCRIPTPATH%\dart.exe"$options "%SCRIPTPATH%$pathWin" --no-colors %arguments%
'''.replaceAll('\n', '\r\n')];
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698