From 481933a0109473b7b594871a229d9e38626c6881 Mon Sep 17 00:00:00 2001 From: David Dias Date: Sun, 21 May 2017 15:50:46 -0400 Subject: [PATCH] fix: issue-858 --- src/core/boot.js | 5 ++--- src/core/components/init.js | 6 +++--- src/init-files/default-config-browser.json | 1 - 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/core/boot.js b/src/core/boot.js index 7a9c8b2cea..5ba2e3b5b6 100644 --- a/src/core/boot.js +++ b/src/core/boot.js @@ -15,9 +15,7 @@ module.exports = (self) => { const repoOpen = !self._repo.closed const customInitOptions = typeof options.init === 'object' ? options.init : {} - const initOptions = Object.assign({ - bits: 2048 - }, customInitOptions) + const initOptions = Object.assign({ bits: 2048 }, customInitOptions) // Checks if a repo exists, and if so opens it // Will return callback with a bool indicating the existence @@ -88,6 +86,7 @@ module.exports = (self) => { (cb) => self.config.get(cb), (config, cb) => { extend(config, options.config) + self.config.replace(config, cb) } ], cb) diff --git a/src/core/components/init.js b/src/core/components/init.js index 2e1fa30687..594b432c00 100644 --- a/src/core/components/init.js +++ b/src/core/components/init.js @@ -97,10 +97,10 @@ module.exports = function init (self) { parallel(tasks, (err) => { if (err) { - return cb(err) + cb(err) + } else { + cb(null, true) } - - cb(null, true) }) } ], done) diff --git a/src/init-files/default-config-browser.json b/src/init-files/default-config-browser.json index e21d36ad15..f09f212c63 100644 --- a/src/init-files/default-config-browser.json +++ b/src/init-files/default-config-browser.json @@ -15,7 +15,6 @@ "Enabled": true } }, - "Discovery": {}, "Bootstrap": [ "/dns4/ams-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLer265NRgSp2LA3dPaeykiS1J6DifTC88f5uVQKNAd", "/dns4/sfo-1.bootstrap.libp2p.io/tcp/443/wss/ipfs/QmSoLju6m7xTh3DuokvT3886QRYqxAzb1kShaanJgW36yx",