diff options
author | Rebecca Turner <me@re-becca.org> | 2015-08-21 14:36:13 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2015-08-27 02:51:12 +0300 |
commit | 4468c92eccd0814b567606897e0792e49640e056 (patch) | |
tree | 6a765a1fcc0d0fa8abe0d682a0db5fe49ece300d /lib | |
parent | d088b7df7a6d620d0adac53a339c0108fe5f9685 (diff) |
deps: Use package relative paths for specifier realization
PR-URL: https://github.com/npm/npm/pull/9367
Fixes: #9205
Diffstat (limited to 'lib')
-rw-r--r-- | lib/install/deps.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/install/deps.js b/lib/install/deps.js index 397aed6d6..de9d59f9c 100644 --- a/lib/install/deps.js +++ b/lib/install/deps.js @@ -85,7 +85,7 @@ function recalculateMetadata (tree, log, seen, next) { if (tree.parent == null) resetMetadata(tree) function markDeps (spec, done) { validate('SF', arguments) - realizePackageSpecifier(spec, tree.path, function (er, req) { + realizePackageSpecifier(spec, packageRelativePath(tree), function (er, req) { if (er) return done() var child = findRequirement(tree, req.name, req) if (child) { @@ -352,7 +352,7 @@ function addDependency (name, versionSpec, tree, log, done) { validate('SSOOF', arguments) var next = andAddParentToErrors(tree, done) var spec = name + '@' + versionSpec - realizePackageSpecifier(spec, tree.path, function (er, req) { + realizePackageSpecifier(spec, packageRelativePath(tree), function (er, req) { var child = findRequirement(tree, name, req) if (child) { resolveWithExistingModule(child, tree, log, iferr(next, function (child, log) { |