Permalink
Browse files

Closes GH-627 Revert 'rm privilege escalation'. Causes issues.

Reverts the following commits:

* 1679d41 isaacs privilege escalation is an info, not a warn (2 weeks ago)
* 08e59c1 isaacs Cooler prompt (2 weeks ago)
* b43a6ae isaacs Escalate perms when rm fails. (2 weeks ago)
  • Loading branch information...
1 parent 2e9aca8 commit a4836682d7cc4d107fcb21e0b69ab20a5886328b @isaacs isaacs committed Feb 23, 2011
Showing with 0 additions and 11 deletions.
  1. +0 −11 lib/utils/rm-rf.js
View
@@ -8,7 +8,6 @@ var fs = require("./graceful-fs")
, sys = require("./sys")
, failedToRemove = []
, log = require("./log")
- , exec = require("./exec")
, constants = require("constants")
process.on("exit", function () {
@@ -42,16 +41,6 @@ function rm (p, cb_) {
return setTimeout(function () { rm(p, cb_) }, time)
}
}
- if (er.errno === constants.EACCES) {
- // ask for privs
- var sudoEnv ={SUDO_PROMPT:"[npm rm "+p+"] Password:"}
- for (var i in process.env) sudoEnv[i] = process.env[i]
- log.info("rm "+p, "privilege escalation")
- return exec("sudo", ["rm", "-r", p]
- ,sudoEnv
- ,true
- ,cb)
- }
failedToRemove.push(p)
log(p, "rm fail")
log(er.message, "rm fail")

0 comments on commit a483668

Please sign in to comment.