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>2011-05-01 00:18:49 +0400
committerisaacs <i@izs.me>2011-05-01 00:20:34 +0400
commitbecde9df8dffd464a4c90ffdd5d402cb4db85abc (patch)
tree7ccc2e2db8c4c6be946e0e5d7d2e3677e6d8390a
parentdafc7d0d971f1b7d27e8cd0c6ebb55cdb17290c6 (diff)
use force if requested
-rw-r--r--lib/unbuild.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unbuild.js b/lib/unbuild.js
index 765965599..175d74d48 100644
--- a/lib/unbuild.js
+++ b/lib/unbuild.js
@@ -53,7 +53,7 @@ function rmBins (pkg, folder, parent, top, cb) {
: path.resolve(parent, ".bin")
log.verbose([binRoot, pkg.bin], "binRoot")
asyncMap(Object.keys(pkg.bin), function (b, cb) {
- rm(path.resolve(binRoot, b), folder, cb)
+ rm(path.resolve(binRoot, b), !npm.config.get("force") && folder, cb)
}, cb)
}
@@ -72,6 +72,6 @@ function rmMans (pkg, folder, parent, top, cb) {
: pkg.name + "-" + bn)
+ "." + sxn + gz
)
- rm(manDest, folder, cb)
+ rm(manDest, !npm.config.get("force") && folder, cb)
}, cb)
}