Permalink
Browse files

Closes GH-742 Update regression

changed the output of 'outdated' command to be more useful,
but that broke 'update'.  Fixed.
  • Loading branch information...
1 parent 6276c32 commit 6bf81ec671683352cfbaba6c49524abea8d368b8 @isaacs isaacs committed Mar 23, 2011
Showing with 7 additions and 5 deletions.
  1. +6 −4 lib/outdated.js
  2. +1 −1 lib/update.js
View
@@ -50,7 +50,7 @@ function outdated (args, silent, cb) {
if (er) return cb(er)
if (list.length && !silent) {
var outList = list.map(function (ww) {
- return ww[1] + ": "+ww[0] + (ww[2] ? " (currently: "+ww[2]+")":"")
+ return ww[1] + ": "+ww[3] + (ww[2] ? " (currently: "+ww[2]+")":"")
})
output = output || require("./utils/output")
output.write(outList.join("\n"), function (e) {
@@ -72,9 +72,11 @@ function outdated_ (prefix, args, cb) {
validateDep(prefix, args, dep, req, function (er, exists, needsUpdate) {
if (er) return cb(er)
log([prefix, dep, req, exists, needsUpdate], "outdated_")
- if (needsUpdate) return cb(null, [[path.resolve(prefix
- , "node_modules", dep)
- , dep, exists]])
+ var dir = path.resolve(prefix, "node_modules", dep)
+ if (needsUpdate) return cb(null, [[ prefix
+ , dep
+ , exists
+ , dir ]])
else if (!exists) return cb(null, [])
else outdated_(path.resolve(prefix, "node_modules", dep), args, cb)
})
View
@@ -21,9 +21,9 @@ function update (args, cb) {
log(outdated, "outdated updating")
if (er) return cb(er)
asyncMap(outdated, function (ww, cb) {
- log(ww, "updating")
var where = ww[0]
, what = ww[1]
+ log([where, what], "updating")
npm.commands.install(where, what, cb)
}, cb)
})

0 comments on commit 6bf81ec

Please sign in to comment.