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

Unified Diff: utils/pub/pub.dart

Issue 14070010: Refactor Future constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added co19 issue number. Created 7 years, 8 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 | « utils/pub/path_source.dart ('k') | utils/pub/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index e523608253cec6ecbdee0a8c21ffca4ac299955c..9af9c27c921e5e1006d80f640990f78bd4ad5425 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -145,7 +145,7 @@ main() {
/// Checks that pub is running on a supported platform. If it isn't, it prints
/// an error message and exits. Completes when the validation is done.
Future validatePlatform() {
- return new Future.of(() {
+ return new Future.sync(() {
if (Platform.operatingSystem != 'windows') return;
return runProcess('ver', []).then((result) {
@@ -267,7 +267,7 @@ abstract class PubCommand {
exit(_chooseExitCode(error));
}
- new Future.of(() {
+ new Future.sync(() {
if (requiresEntrypoint) {
// TODO(rnystrom): Will eventually need better logic to walk up
// subdirectories until we hit one that looks package-like. For now,
« no previous file with comments | « utils/pub/path_source.dart ('k') | utils/pub/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698