diff options
-rw-r--r-- | lib/uninstall.js | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js index b5bc37993..61b3e3725 100644 --- a/lib/uninstall.js +++ b/lib/uninstall.js @@ -118,7 +118,7 @@ function checkDependents (pkg, others, cb) { } function secondPart (args, cb) { - var c = args.map(function (arg) { return function (cb) { + asyncMap(args, function (arg, cb) { var name = arg.name chain ( function (cb) { @@ -152,9 +152,7 @@ function secondPart (args, cb) { , [log, "complete", "uninstall "+arg._id] , cb ) - }}) - c.push(cb) - chain(c) + }, cb) } function rmMans (pkg, cb) { var manroot = npm.config.get("manroot") |