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

Commit

Permalink
no more caching of init files
Browse files Browse the repository at this point in the history
DO NOT USE require for JSON FILES
  • Loading branch information
dignifiedquire committed May 11, 2016
1 parent 1944ad9 commit 1adef97
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/ipfs/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = function init (self) {
opts.bits = opts.bits || 2048

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

// Verify repo does not yet exist.
self._repo.exists((err, exists) => {
Expand Down
1 change: 0 additions & 1 deletion test/core-tests/test-bitswap.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ describe('bitswap', () => {

target = target.replace('0.0.0.0', '127.0.0.1')
const swarm = node2.libp2p ? node2.libp2p.swarm : node2.swarm
console.log('connecting to %s', target)
swarm.connect(target, done)
})
}
Expand Down

0 comments on commit 1adef97

Please sign in to comment.