summaryrefslogtreecommitdiff
path: root/deps/npm/lib/install/action/fetch.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/install/action/fetch.js')
-rw-r--r--deps/npm/lib/install/action/fetch.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/npm/lib/install/action/fetch.js b/deps/npm/lib/install/action/fetch.js
index 474e00b05c..a4d760fe82 100644
--- a/deps/npm/lib/install/action/fetch.js
+++ b/deps/npm/lib/install/action/fetch.js
@@ -1,5 +1,8 @@
'use strict'
+const BB = require('bluebird')
+
+const finished = BB.promisify(require('mississippi').finished)
const packageId = require('../../utils/package-id.js')
const pacote = require('pacote')
const pacoteOpts = require('../../config/pacote')
@@ -8,5 +11,6 @@ module.exports = fetch
function fetch (staging, pkg, log, next) {
log.silly('fetch', packageId(pkg))
const opts = pacoteOpts({integrity: pkg.package._integrity})
- pacote.prefetch(pkg.package._requested, opts).then(() => next(), next)
+ return finished(pacote.tarball.stream(pkg.package._requested, opts))
+ .then(() => next(), next)
}