Index: sdk/lib/_internal/pub/lib/src/source/git.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/source/git.dart b/sdk/lib/_internal/pub/lib/src/source/git.dart |
index c50e7196c97b3b0caf3407e886d7afe79e6bcd44..2981ebe42f6f8a27073a5f7c9fc61a853bb8e370 100644 |
--- a/sdk/lib/_internal/pub/lib/src/source/git.dart |
+++ b/sdk/lib/_internal/pub/lib/src/source/git.dart |
@@ -130,8 +130,9 @@ class GitSource extends Source { |
/// Returns a future that completes to the revision hash of [id]. |
Future<String> _revisionAt(PackageId id) { |
- return git.run(["rev-parse", _getEffectiveRef(id)], |
- workingDir: _repoCachePath(id)).then((result) => result[0]); |
+ return _ensureRepoCache(id).then((_) => |
+ git.run(["rev-parse", _getEffectiveRef(id)], |
+ workingDir: _repoCachePath(id)).then((result) => result[0])); |
} |
/// Clones the repo at the URI [from] to the path [to] on the local |