Permalink
Browse files

Fix logging around optional dependency failures

  • Loading branch information...
1 parent 2184f02 commit c03e41e329f50fb3cb6a40df2bb118ea71b6729f @isaacs isaacs committed Mar 13, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/install.js
View
@@ -514,7 +514,8 @@ function targetResolver (where, context, deps) {
cache.add(what, function (er, data) {
if (er && parent && parent.optionalDependencies &&
parent.optionalDependencies.hasOwnProperty(what.split("@")[0])) {
- log.warn([target._id, er], "optional dependency failed, continuing")
+ log.warn(what, "optional dependency failed, continuing")
+ log.verbose([what, er], "optional dependency failed, continuing")
return cb(null, [])
}
@@ -547,7 +548,8 @@ function installOne (target, where, context, cb) {
// check if this one is optional to its parent.
if (er && context.parent && context.parent.optionalDependencies &&
context.parent.optionalDependencies.hasOwnProperty(target.name)) {
- log.warn([target._id, er], "optional dependency failed, continuing")
+ log.warn(target._id, "optional dependency failed, continuing")
+ log.verbose([target._id, er], "optional dependency failed, continuing")
er = null
}

0 comments on commit c03e41e

Please sign in to comment.