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

Unified Diff: compiler/java/com/google/dart/compiler/DartCompiler.java

Issue 12045088: Issue 8051. Make extended exit codes optional. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
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);
+ }
}
/**

Powered by Google App Engine
This is Rietveld 408576698