Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Commit

Permalink
deps: Use shrinkwrap root for relative pathing
Browse files Browse the repository at this point in the history
  • Loading branch information
iarna committed May 24, 2018
1 parent 2f0c883 commit 631d30a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/install/deps.js
Expand Up @@ -85,8 +85,8 @@ function doesChildVersionMatch (child, requested, requestor) {
}
}

function childDependencySpecifier (tree, name, spec) {
return npa.resolve(name, spec, packageRelativePath(tree))
function childDependencySpecifier (tree, name, spec, where) {
return npa.resolve(name, spec, where || packageRelativePath(tree))
}

exports.computeMetadata = computeMetadata
Expand Down Expand Up @@ -547,7 +547,7 @@ function addDependency (name, versionSpec, tree, log, done) {
try {
var req = childDependencySpecifier(tree, name, versionSpec)
if (tree.swRequires && tree.swRequires[name]) {
var swReq = childDependencySpecifier(tree, name, tree.swRequires[name])
var swReq = childDependencySpecifier(tree, name, tree.swRequires[name], tree.package._where)
}
} catch (err) {
return done(err)
Expand Down

0 comments on commit 631d30a

Please sign in to comment.