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

Unified Diff: lib/src/entrypoint.dart

Issue 1228093003: Fix several package spec bugs. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Code review changes Created 5 years, 5 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
Index: lib/src/entrypoint.dart
diff --git a/lib/src/entrypoint.dart b/lib/src/entrypoint.dart
index 2dc3d136e0834f092887201a4fc902584169f91e..ed0d087ca454efa1817e9622033f882a29fbc3fc 100644
--- a/lib/src/entrypoint.dart
+++ b/lib/src/entrypoint.dart
@@ -470,6 +470,8 @@ class Entrypoint {
var graph = await log.progress("Loading package graph", () async {
if (result != null) {
var packages = await Future.wait(result.packages.map((id) async {
+ if (id.name == root.name) return root;
+
var dir = await cache.sources[id.source].getDirectory(id);
return new Package(result.pubspecs[id.name], dir);
}));

Powered by Google App Engine
This is Rietveld 408576698