Chromium Code Reviews| Index: utils/pub/pub.dart |
| diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart |
| index e85b60efc7c621468b2b5171741de9ffd7c0b69b..a5d8340f5fd9b25a0eeaead2fb7da01eebb92f24 100644 |
| --- a/utils/pub/pub.dart |
| +++ b/utils/pub/pub.dart |
| @@ -102,7 +102,7 @@ main() { |
| } |
| var commandArgs = |
| - globalOptions.rest.getRange(1, globalOptions.rest.length - 1); |
| + globalOptions.rest.getRange(1, globalOptions.rest.length - 1); |
| command.run(cache, globalOptions, commandArgs); |
| } |
| @@ -221,6 +221,8 @@ abstract class PubCommand { |
| } |
| }); |
| + future = future.chain((_) => cache_.deleteTempDir()); |
|
kasperl
2012/10/16 06:08:50
I guess this should always be done (also in the ex
|
| + |
| future.handleException((e) { |
| if (e is PubspecNotFoundException && e.name == null) { |
| e = 'Could not find a file named "pubspec.yaml" in the directory ' |
| @@ -232,6 +234,7 @@ abstract class PubCommand { |
| handleError(e, future.stackTrace); |
| }); |
| + |
| // Explicitly exit on success to ensure that any dangling dart:io handles |
| // don't cause the process to never terminate. |
| future.then((_) => exit(0)); |