Chromium Code Reviews

Unified Diff: sdk/lib/_internal/pub/lib/src/command/uploader.dart

Issue 24270004: Close stdout and stderr before exiting Pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Import fixes Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command/uploader.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/uploader.dart b/sdk/lib/_internal/pub/lib/src/command/uploader.dart
index f3cf290b38be2ef23276c37058509a07897973e6..f4e80ffde894a4cacb00b1c9ce5575de9a80ec66 100644
--- a/sdk/lib/_internal/pub/lib/src/command/uploader.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/uploader.dart
@@ -13,6 +13,7 @@ import '../command.dart';
import '../entrypoint.dart';
import '../exit_codes.dart' as exit_codes;
import '../http.dart';
+import '../io.dart';
import '../log.dart' as log;
import '../oauth2.dart' as oauth2;
import '../source/hosted.dart';
@@ -38,7 +39,7 @@ class UploaderCommand extends PubCommand {
if (commandOptions.rest.isEmpty) {
log.error('No uploader command given.');
this.printUsage();
- exit(exit_codes.USAGE);
+ return flushThenExit(exit_codes.USAGE);
}
var rest = commandOptions.rest.toList();
@@ -47,11 +48,11 @@ class UploaderCommand extends PubCommand {
if (!['add', 'remove'].contains(command)) {
log.error('Unknown uploader command "$command".');
this.printUsage();
- exit(exit_codes.USAGE);
+ return flushThenExit(exit_codes.USAGE);
} else if (rest.isEmpty) {
log.error('No uploader given for "pub uploader $command".');
this.printUsage();
- exit(exit_codes.USAGE);
+ return flushThenExit(exit_codes.USAGE);
}
return new Future.sync(() {
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/command/serve.dart ('k') | sdk/lib/_internal/pub/lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine