Chromium Code Reviews| Index: utils/pub/entrypoint.dart |
| diff --git a/utils/pub/entrypoint.dart b/utils/pub/entrypoint.dart |
| index 054541d4e303a0967a33e5b88bbb17d38b128cf2..4259807c27db3b801b2117b14eb010624c785008 100644 |
| --- a/utils/pub/entrypoint.dart |
| +++ b/utils/pub/entrypoint.dart |
| @@ -82,7 +82,7 @@ class Entrypoint { |
| }).then((_) { |
| if (id.source.shouldCache) { |
| return cache.install(id).then( |
| - (pkg) => createPackageSymlink(id.name, pkg.dir, packageDir)); |
| + (pkg) => createPackageSymlink(id.name, packageDir, pkg.dir)); |
| } else { |
| return id.source.install(id, packageDir).then((found) { |
| if (found) return null; |
| @@ -209,7 +209,8 @@ class Entrypoint { |
| LockFile loadLockFile() { |
| var lockFilePath = path.join(root.dir, 'pubspec.lock'); |
| if (!fileExists(lockFilePath)) return new LockFile.empty(); |
| - return new LockFile.parse(readTextFile(lockFilePath), cache.sources); |
| + return new LockFile.parse(lockFilePath, readTextFile(lockFilePath), |
| + cache.sources); |
|
nweiz
2013/02/15 23:09:24
Should this be LockFile.load, which just takes a p
Bob Nystrom
2013/02/16 00:09:57
Done.
|
| } |
| /// Saves a list of concrete package versions to the `pubspec.lock` file. |
| @@ -231,7 +232,7 @@ class Entrypoint { |
| // Create the symlink if it doesn't exist. |
| if (entryExists(linkPath)) return; |
| ensureDir(packagesDir); |
| - return createPackageSymlink(root.name, root.dir, linkPath, |
| + return createPackageSymlink(root.name, linkPath, root.dir, |
| isSelfLink: true); |
| }); |
| } |
| @@ -294,9 +295,9 @@ class Entrypoint { |
| /// Creates a symlink to the `packages` directory in [dir] if none exists. |
| Future _linkSecondaryPackageDir(String dir) { |
| return defer(() { |
| - var to = path.join(dir, 'packages'); |
| - if (entryExists(to)) return; |
| - return createSymlink(packagesDir, to); |
| + var symlink = path.join(dir, 'packages'); |
| + if (entryExists(symlink)) return; |
| + return createSymlink(symlink, packagesDir); |
| }); |
| } |
| } |