Index: utils/pub/pub.dart |
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart |
index 6db58c53619d6dffd6234365c233f14e12b4a355..0e4fe7281a1ddaf9f44b40eb554232e0b72c8545 100644 |
--- a/utils/pub/pub.dart |
+++ b/utils/pub/pub.dart |
@@ -184,8 +184,6 @@ class PubCommand { |
handleError(error, trace) { |
// This is basically the top-level exception handler so that we don't |
// spew a stack trace on our users. |
- // TODO(rnystrom): Add --trace flag so stack traces can be enabled for |
- // debugging. |
var message = error.toString(); |
// TODO(rnystrom): The default exception implementation class puts |
@@ -198,7 +196,10 @@ class PubCommand { |
if (globalOptions['trace'] && trace != null) { |
printError(trace); |
} |
- return true; |
+ |
+ // TODO(nweiz): Use the more semantic error codes in |
+ // http://www.freebsd.org/cgi/man.cgi?query=sysexits |
+ exit(1); |
} |
// TODO(rnystrom): Will eventually need better logic to walk up |
@@ -218,6 +219,7 @@ class PubCommand { |
} |
}); |
future.handleException((e) => handleError(e, future.stackTrace)); |
+ future.then((_) => exit(0)); |
Bob Nystrom
2012/09/05 00:52:00
Can you add a comment here saying this is success
nweiz
2012/09/05 00:59:19
Done.
|
} |
/** |