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

Unified Diff: utils/pub/command_lish.dart

Issue 12193014: Wait until file list is available before printing it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 10 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 | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_lish.dart
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index 4a370d7d67a1815dce0c76525bb35b7b3c167b9e..1566f1485f11d86408fb49977692e34b7dceab31 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -86,20 +86,19 @@ class LishCommand extends PubCommand {
}
Future onRun() {
- var files;
- var packageBytesFuture = _filesToPublish.then((f) {
- files = f;
+ var packageBytesFuture = _filesToPublish.then((files) {
log.fine('Archiving and publishing ${entrypoint.root}.');
+
+ // Show the package contents so the user can verify they look OK.
+ var package = entrypoint.root;
+ log.message(
+ 'Publishing "${package.name}" ${package.version}:\n'
+ '${generateTree(files)}');
+
return createTarGz(files, baseDir: entrypoint.root.dir);
}).then((stream) => stream.toBytes());
- // Show the package contents so the user can verify they look OK.
- var package = entrypoint.root;
- log.message(
- 'Publishing "${package.name}" ${package.version}:\n'
- '${generateTree(files)}');
-
- // Validate the package.
+ // Validate the package.
return _validate(packageBytesFuture.then((bytes) => bytes.length))
.then((_) => packageBytesFuture).then(_publish);
}
« no previous file with comments | « no previous file | utils/tests/pub/pub_lish_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698