Permalink
Browse files

return uninstall module warning on npm uninstall

  • Loading branch information...
1 parent 58c77b8 commit ed529e2ecf50eff5fe02e57a591dde9d7c78879b @gradus committed Mar 30, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/uninstall.js
View
@@ -39,6 +39,7 @@ function uninstall (args, cb) {
}
function uninstall_ (args, nm, cb) {
+ var o = uninstallOutput(args, nm)
asyncMap(args, function (arg, cb) {
// uninstall .. should not delete /usr/local/lib/node_modules/..
var p = path.join(path.resolve(nm), path.join("/", arg))
@@ -51,10 +52,17 @@ function uninstall_ (args, nm, cb) {
log.warn(arg, "Not installed in "+nm)
return cb(null, [])
}
- cb(null, p)
+ cb(null, p, o)
})
}, function (er, folders) {
if (er) return cb(er)
asyncMap(folders, npm.commands.unbuild, cb)
})
}
+
+function uninstallOutput (args, nm) {
+ for (var i = 0; i < args.length; i++) {
+ var p = path.join(path.resolve(nm), path.join("/", args[i]))
+ log.warn(p, "uninstalling")
+ }
+}

0 comments on commit ed529e2

Please sign in to comment.