Index: compiler/java/com/google/dart/compiler/DartCompiler.java |
diff --git a/compiler/java/com/google/dart/compiler/DartCompiler.java b/compiler/java/com/google/dart/compiler/DartCompiler.java |
index 07551d93de98f955e64fcfd2c098397465e6aa16..08ccaa1e951a3efd112ef839b38b5a44a1585086 100644 |
--- a/compiler/java/com/google/dart/compiler/DartCompiler.java |
+++ b/compiler/java/com/google/dart/compiler/DartCompiler.java |
@@ -1068,7 +1068,18 @@ public class DartCompiler { |
t.printStackTrace(); |
crash(); |
} |
- System.exit(result.code); |
+ // exit |
+ { |
+ int exitCode = result.code; |
+ if (!topCompilerOptions.extendedExitCode()) { |
+ if (exitCode == RESULT_ERRORS) { |
+ exitCode = 1; |
+ } else { |
+ exitCode = 0; |
+ } |
+ } |
+ System.exit(exitCode); |
+ } |
} |
/** |