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>2012-04-07 01:38:37 +0400
committerisaacs <i@izs.me>2012-04-07 01:38:37 +0400
commit1bdb212393cc1d3ca31119e447e66ba8178dac55 (patch)
tree78960a480d9d311c562dc8229232dea5fe34f113
parent16c02cb363dc918d827205e27bf5a282ea4e5b5c (diff)
init: Allow clobbering repository with 'none'
-rw-r--r--lib/init.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/init.js b/lib/init.js
index 174d61822..7cd7da8e2 100644
--- a/lib/init.js
+++ b/lib/init.js
@@ -99,7 +99,10 @@ function init_ (data, folder, cb) {
, function (er, r) {
if (er) return cb(er)
if (r !== "none") {
- (data.repository = (data.repository || {})).url = r
+ data.repository = (data.repository || {})
+ data.repository.url = r
+ } else {
+ delete data.repository
}
cb()
}