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

Unified Diff: utils/pub/io.dart

Issue 10966004: Fix API misuse bug I introduced when fixing another API misuse bug. :-) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index 0fb9b9bd2643f84a6692db18118558264b955679..ad50c653375cc2629e65b85db8c66f487cd16805 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -612,15 +612,15 @@ Future<bool> extractTarGz(InputStream stream, destination) {
["--extract", "--gunzip", "--directory", destination]);
var completer = new Completer<int>();
+ process.onExit = completer.complete;
+ process.onError = completer.completeException;
+
// Wait for the process to be fully started before writing to its
// stdin stream.
process.onStart = () {
stream.pipe(process.stdin);
process.stdout.pipe(stdout, close: false);
process.stderr.pipe(stderr, close: false);
-
- process.onExit = completer.complete;
- process.onError = completer.completeException;
};
return completer.future.transform((exitCode) => exitCode == 0);
« 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