summaryrefslogtreecommitdiff
path: root/deps/npm/lib/cache.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/lib/cache.js')
-rw-r--r--deps/npm/lib/cache.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/deps/npm/lib/cache.js b/deps/npm/lib/cache.js
index af1ac57e71..8bd2d5fcb1 100644
--- a/deps/npm/lib/cache.js
+++ b/deps/npm/lib/cache.js
@@ -4,6 +4,7 @@ const BB = require('bluebird')
const assert = require('assert')
const cacache = require('cacache')
+const finished = BB.promisify(require('mississippi').finished)
const log = require('npmlog')
const npa = require('npm-package-arg')
const npm = require('./npm.js')
@@ -105,7 +106,7 @@ function add (args, where) {
log.verbose('cache add', 'spec', spec)
if (!spec) return BB.reject(new Error(usage))
log.silly('cache add', 'parsed spec', spec)
- return pacote.prefetch(spec, pacoteOpts({where}))
+ return finished(pacote.tarball.stream(spec, pacoteOpts({where})).resume())
}
cache.verify = verify