From 1a6ee99bad5c38920ac0489cac1074f4a890bfc3 Mon Sep 17 00:00:00 2001 From: isaacs Date: Tue, 3 Aug 2010 00:13:55 -0700 Subject: Better messaging --- lib/update.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib/update.js') diff --git a/lib/update.js b/lib/update.js index 27d642afc..682f80b88 100644 --- a/lib/update.js +++ b/lib/update.js @@ -49,7 +49,6 @@ function update (args, cb) { }) } function installUpdates (updates, cb) { - log(updates, "install updates") npm.config.set("auto-update", true) var installList = [] , updateList = [] @@ -63,6 +62,11 @@ function installUpdates (updates, cb) { }) log(installList, "update installList") log(updateList, "update updateList") + var fullList = installList.concat(updateList) + cb = (function (cb) { return function (er) { + log(fullList.join(" "), er ? "failed to update" : "updated") + cb(er) + }})(cb) npm.commands.install(installList, function (er) { if (er) return log.er(cb, "install failed "+installList)(er) npm.commands["update-dependents"](updateList, function (er) { @@ -73,10 +77,8 @@ function installUpdates (updates, cb) { } function findUpdates (args, cb) { - log(args, "findUpdates") readInstalled(args, function (er, inst) { if (er) return log.er(cb, "Couldn't read installed packages")(er) - log(inst, "installed") var pkgs = Object.keys(inst) , p = pkgs.length , updates = {} -- cgit v1.2.3