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

Unified Diff: sdk/lib/_internal/pub/lib/src/command/lish.dart

Issue 341643002: Make short-running Git operations synchronous. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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 | sdk/lib/_internal/pub/lib/src/entrypoint.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/lib/src/command/lish.dart
diff --git a/sdk/lib/_internal/pub/lib/src/command/lish.dart b/sdk/lib/_internal/pub/lib/src/command/lish.dart
index 7706f402ca223049798b19001af8e8e32a996666..38fa8eded9fc6d2fc84a722c3ba775b24d0392e3 100644
--- a/sdk/lib/_internal/pub/lib/src/command/lish.dart
+++ b/sdk/lib/_internal/pub/lib/src/command/lish.dart
@@ -97,17 +97,17 @@ class LishCommand extends PubCommand {
usageError('Cannot use both --force and --dry-run.');
}
- var packageBytesFuture = entrypoint.packageFiles().then((files) {
- log.fine('Archiving and publishing ${entrypoint.root}.');
+ var files = entrypoint.packageFiles();
+ 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} to $server:\n'
- '${tree.fromFiles(files, baseDir: entrypoint.root.dir)}');
+ // Show the package contents so the user can verify they look OK.
+ var package = entrypoint.root;
+ log.message(
+ 'Publishing ${package.name} ${package.version} to $server:\n'
+ '${tree.fromFiles(files, baseDir: entrypoint.root.dir)}');
- return createTarGz(files, baseDir: entrypoint.root.dir);
- }).then((stream) => stream.toBytes());
+ var packageBytesFuture = createTarGz(files, baseDir: entrypoint.root.dir)
+ .toBytes();
// Validate the package.
return _validate(packageBytesFuture.then((bytes) => bytes.length))
« no previous file with comments | « no previous file | sdk/lib/_internal/pub/lib/src/entrypoint.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698