diff options
author | Kat Marchán <kzm@sykosomatic.org> | 2017-05-28 21:04:08 -0700 |
---|---|---|
committer | James M Snell <jasnell@gmail.com> | 2017-05-29 09:36:12 -0700 |
commit | 6083c4dc102b4da306faaf81469e33687f30daf1 (patch) | |
tree | b2d3a62f03531e9ca7c3a7eebbf562efc91b15ca /deps/npm/lib/install/action/finalize.js | |
parent | ac2e8820c4c4188e54afa0cf0d9fea8ec823e15d (diff) | |
download | node-new-6083c4dc102b4da306faaf81469e33687f30daf1.tar.gz |
deps: upgrade npm to 5.0.0
PR-URL: https://github.com/nodejs/node/pull/13276
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Diffstat (limited to 'deps/npm/lib/install/action/finalize.js')
-rw-r--r-- | deps/npm/lib/install/action/finalize.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/deps/npm/lib/install/action/finalize.js b/deps/npm/lib/install/action/finalize.js index 1e86475710..ba38e602f8 100644 --- a/deps/npm/lib/install/action/finalize.js +++ b/deps/npm/lib/install/action/finalize.js @@ -23,10 +23,11 @@ module.exports = function (staging, pkg, log) { const requested = pkg.package._requested || getRequested(pkg) if (requested.type === 'directory') { + const relative = path.relative(path.dirname(pkg.path), pkg.realpath) return makeParentPath(pkg.path) - .then(() => symlink(pkg.realpath, pkg.path, 'junction')) + .then(() => symlink(relative, pkg.path, 'junction')) .catch((ex) => { - return rimraf(pkg.path).then(() => symlink(pkg.realpath, pkg.path, 'junction')) + return rimraf(pkg.path).then(() => symlink(relative, pkg.path, 'junction')) }) } else { return makeParentPath(pkg.realpath) |