diff options
author | isaacs <i@izs.me> | 2010-05-03 10:39:12 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2010-05-03 10:42:47 +0400 |
commit | 6b75d97f702a2a9325f5811d969c01dd9da1c558 (patch) | |
tree | 8c14c83ee9661cf82b59bfb46af4c278401d3a7f /lib | |
parent | 30b54945ea299cb489ba49ccf56ccb17e655d325 (diff) |
Remove versioned as well as unversioned bin files
Diffstat (limited to 'lib')
-rw-r--r-- | lib/uninstall.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/uninstall.js b/lib/uninstall.js index f6dc80424..da9d1b345 100644 --- a/lib/uninstall.js +++ b/lib/uninstall.js @@ -76,11 +76,16 @@ function uninstall (args, cb) { } function removeBins (data, cb) { + log(data.bin, "remove bins") if (!data.bin) return cb() var binroot = path.join(process.installPrefix, "bin") ;(function R (bins) { if (!bins.length) return cb() - rm(binroot + "/" + bins.pop(), cb) + chain + ( [rm, binroot + "/" + bins.pop()+"-"+data.version] + , [rm, binroot + "/" + bins.pop()] + , cb + ) })(Object.getOwnPropertyNames(data.bin)) } |