Create an explicit lambda for onExit.

This is needed because completer.complete() now takes an optional
argument. A function with an optional argument isn't a subtype of
the same function without the argument being optional.

Review URL: https://codereview.chromium.org//11794051

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16817 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
rnystrom@google.com 2013-01-08 19:34:25 +00:00
parent e8a293c05a
commit 50bdaac949

View file

@ -779,7 +779,7 @@ Future<bool> extractTarGz(InputStream stream, destination) {
var processFuture = startProcess("tar",
["--extract", "--gunzip", "--directory", destination]);
processFuture.then((process) {
process.onExit = completer.complete;
process.onExit = (exitCode) => completer.complete(exitCode);
stream.pipe(process.stdin);
process.stdout.pipe(stdout, close: false);
process.stderr.pipe(stderr, close: false);