aboutsummaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
index 8ad2b6860b..2c63872e7f 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/tarball.js
@@ -51,7 +51,10 @@ function fromManifest (manifest, spec, opts) {
],
spec
}, opts)).then(res => {
- stream.emit('integrity', res.headers.get('x-local-cache-hash'))
+ const hash = res.headers.get('x-local-cache-hash')
+ if (hash) {
+ stream.emit('integrity', decodeURIComponent(hash))
+ }
res.body.on('error', err => stream.emit('error', err))
res.body.pipe(stream)
}).catch(err => stream.emit('error', err))