Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 1adef97

Browse files
no more caching of init files
DO NOT USE require for JSON FILES
1 parent 1944ad9 commit 1adef97

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/core/ipfs/init.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ module.exports = function init (self) {
1717
opts.bits = opts.bits || 2048
1818

1919
// Pre-set config values.
20-
var config = require('../../init-files/default-config.json')
20+
var config = JSON.parse(fs.readFileSync(path.join(__dirname, '../../init-files/default-config.json')).toString())
2121

2222
// Verify repo does not yet exist.
2323
self._repo.exists((err, exists) => {

test/core-tests/test-bitswap.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ describe('bitswap', () => {
3838

3939
target = target.replace('0.0.0.0', '127.0.0.1')
4040
const swarm = node2.libp2p ? node2.libp2p.swarm : node2.swarm
41-
console.log('connecting to %s', target)
4241
swarm.connect(target, done)
4342
})
4443
}

0 commit comments

Comments
 (0)