Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2010-08-03 11:13:55 +0400
committerisaacs <i@izs.me>2010-08-03 11:13:55 +0400
commit1a6ee99bad5c38920ac0489cac1074f4a890bfc3 (patch)
tree820e91c3629469b221c2f79e741dbb0d343511ef /lib/update.js
parentf9c9fcdc3b8ef845feddbcb9b41bb8ca8b025843 (diff)
Better messaging
Diffstat (limited to 'lib/update.js')
-rw-r--r--lib/update.js8
1 files changed, 5 insertions, 3 deletions
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 = {}