summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/with-tarball-stream.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/with-tarball-stream.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
index abeba738a1..0d84696d66 100644
--- a/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
+++ b/deps/npm/node_modules/pacote/lib/with-tarball-stream.js
@@ -107,7 +107,7 @@ function withTarballStream (spec, opts, streamHandler) {
// Retry once if we have a cache, to clear up any weird conditions.
// Don't retry network errors, though -- make-fetch-happen has already
// taken care of making sure we're all set on that front.
- if (opts.cache && err.code && !err.code.match(/^E\d{3}$/)) {
+ if (opts.cache && err.code && !String(err.code).match(/^E\d{3}$/)) {
if (err.code === 'EINTEGRITY' || err.code === 'Z_DATA_ERROR') {
opts.log.warn('tarball', `tarball data for ${spec} (${opts.integrity}) seems to be corrupted. Trying one more time.`)
}