Permalink
Browse files

Fix the 'cb never called' error from 'oudated'

  • Loading branch information...
1 parent a1c315b commit e6a7e44bfdc225a9a6dd040d0cb2d81f527727a8 @isaacs isaacs committed Jun 17, 2012
Showing with 5 additions and 2 deletions.
  1. +5 −2 lib/outdated.js
View
@@ -34,7 +34,8 @@ function outdated (args, silent, cb) {
if (er || silent) return cb_(er)
var outList = list.map(makePretty)
- require("./utils/output.js").write(outList.join("\n"), cb_)
+ require("./utils/output.js").write(outList.join("\n"))
+ cb_()
})
@jazzzz
jazzzz Jul 12, 2012

This is the change that broke outdated. See issue #2557.

}
@@ -77,7 +78,7 @@ function outdated_ (args, dir, parentHas, cb) {
var deps = null
readJson(path.resolve(dir, "package.json"), function (er, d) {
- deps = (er) ? true : d.dependencies
+ deps = (er) ? true : (d.dependencies || {})
return next()
})
@@ -98,6 +99,7 @@ function outdated_ (args, dir, parentHas, cb) {
pvs.forEach(function (pv) {
has[pv[0]] = pv[1]
})
+
next()
})
})
@@ -110,6 +112,7 @@ function outdated_ (args, dir, parentHas, cb) {
return l
}, {})
}
+
// now get what we should have, based on the dep.
// if has[dep] !== shouldHave[dep], then cb with the data
// otherwise dive into the folder

0 comments on commit e6a7e44

Please sign in to comment.