diff --git a/lib/install/validate-tree.js b/lib/install/validate-tree.js index 5ac979a46c403..d1b40c24c1bcb 100644 --- a/lib/install/validate-tree.js +++ b/lib/install/validate-tree.js @@ -39,8 +39,9 @@ function checkErrors (mod, idealTree, next) { function checkWarnings (mod, idealTree, next) { const warnings = mod.package.warnings - if (warnings && (mod.parent || path.resolve(npm.globalDir, '..'))) { + if (warnings && (mod.parent || path.resolve(npm.globalDir, '..') !== mod.path)) { warnings.forEach(warn => idealTree.warnings.push(warn)) + delete mod.package.warnings } next() }