Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKat Marchán <kzm@sykosomatic.org>2017-05-16 01:14:51 +0300
committerRebecca Turner <me@re-becca.org>2017-05-26 04:55:20 +0300
commitc5151465451e24ed70f0dc5394d300fe8d86b878 (patch)
tree0711d3dbc3e087b01addaaa72a41e9ffceff5bc1 /lib
parent7b9b568a60e555397840897f507cb7e4df57c85f (diff)
fix(auth): resolve _resolved with the package name to get auth working again
Diffstat (limited to 'lib')
-rw-r--r--lib/install/action/extract.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/install/action/extract.js b/lib/install/action/extract.js
index 61a112443..7001c2a24 100644
--- a/lib/install/action/extract.js
+++ b/lib/install/action/extract.js
@@ -9,6 +9,7 @@ const mkdirp = BB.promisify(require('mkdirp'))
const moduleName = require('../../utils/module-name.js')
const moduleStagingPath = require('../module-staging-path.js')
const move = BB.promisify(require('../../utils/move.js'))
+const npa = require('npm-package-arg')
const npm = require('../../npm.js')
const packageId = require('../../utils/package-id.js')
const pacote = require('pacote')
@@ -29,7 +30,9 @@ function extract (staging, pkg, log) {
integrity: pkg.package._integrity
})
return pacote.extract(
- pkg.package._resolved || pkg.package._requested,
+ pkg.package._resolved
+ ? npa.resolve(pkg.package.name, pkg.package._resolved)
+ : pkg.package._requested,
extractTo,
opts
).then(() => {