Index: utils/pub/git_source.dart |
diff --git a/utils/pub/git_source.dart b/utils/pub/git_source.dart |
index 2802ad8a09dde86adb7e24c3fcf8a280747351fa..c98616d195d5eb2ee4615c57a67c512d40440406 100644 |
--- a/utils/pub/git_source.dart |
+++ b/utils/pub/git_source.dart |
@@ -123,7 +123,7 @@ class GitSource extends Source { |
/// future that completes once this is finished and throws an exception if it |
/// fails. |
Future _ensureRepoCache(PackageId id) { |
- return new Future.of(() { |
+ return new Future.sync(() { |
var path = _repoCachePath(id); |
if (!entryExists(path)) return _clone(_getUrl(id), path, mirror: true); |
return git.run(["fetch"], workingDir: path).then((result) => null); |
@@ -143,7 +143,7 @@ class GitSource extends Source { |
/// the working tree, but instead makes the repository a local mirror of the |
/// remote repository. See the manpage for `git clone` for more information. |
Future _clone(String from, String to, {bool mirror: false}) { |
- return new Future.of(() { |
+ return new Future.sync(() { |
// Git on Windows does not seem to automatically create the destination |
// directory. |
ensureDir(to); |