summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js')
-rw-r--r--deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js13
1 files changed, 8 insertions, 5 deletions
diff --git a/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js b/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
index bd4dbc5175..b17a233d43 100644
--- a/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
+++ b/deps/npm/node_modules/pacote/lib/fetchers/registry/check-warning-header.js
@@ -21,11 +21,14 @@ function checkWarnings (res, registry, opts) {
}
})
BAD_HOSTS.set(registry, true)
- if (warnings['199'] && warnings['199'].message.match(/ENOTFOUND/)) {
- opts.log.warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
- } else if (warnings['199']) {
- opts.log.warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
- } else if (warnings['111']) {
+ if (warnings['199']) {
+ if (warnings['199'].message.match(/ENOTFOUND/)) {
+ opts.log.warn('registry', `Using stale data from ${registry} because the host is inaccessible -- are you offline?`)
+ } else {
+ opts.log.warn('registry', `Unexpected warning for ${registry}: ${warnings['199'].message}`)
+ }
+ }
+ if (warnings['111']) {
// 111 Revalidation failed -- we're using stale data
opts.log.warn(
'registry',