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

Unified Diff: utils/pub/pub.dart

Issue 11151035: Download packages to temp dir inside system cache. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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
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));

Powered by Google App Engine
This is Rietveld 408576698