From 3547d99892a3da43831ad74b47488750d4f2da36 Mon Sep 17 00:00:00 2001 From: Ruy Adorno Date: Fri, 4 Oct 2019 09:36:04 -0400 Subject: [PATCH] Removes warnings from package manifest --- lib/install/validate-tree.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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() }