Skip to content

Commit 3547d99

Browse files
ruyadornoisaacs
authored andcommitted
Removes warnings from package manifest
1 parent 62f2ca6 commit 3547d99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/install/validate-tree.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ function checkErrors (mod, idealTree, next) {
3939

4040
function checkWarnings (mod, idealTree, next) {
4141
const warnings = mod.package.warnings
42-
if (warnings && (mod.parent || path.resolve(npm.globalDir, '..'))) {
42+
if (warnings && (mod.parent || path.resolve(npm.globalDir, '..') !== mod.path)) {
4343
warnings.forEach(warn => idealTree.warnings.push(warn))
44+
delete mod.package.warnings
4445
}
4546
next()
4647
}

0 commit comments

Comments
 (0)