Skip to content

Commit

Permalink
fix(tests): use string address when spawning daemons
Browse files Browse the repository at this point in the history
  • Loading branch information
aknuds1 committed Jul 5, 2019
1 parent 6882833 commit d27a4c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
},
"homepage": "https://github.com/libp2p/interop#readme",
"devDependencies": {
"@arve.knudsen/libp2p-daemon": "^0.2.5",
"@arve.knudsen/libp2p-daemon": "^0.2.6",
"@arve.knudsen/libp2p-daemon-client": "~0.1.9",
"aegir": "^19.0.3",
"chai": "^4.2.0",
Expand Down
5 changes: 3 additions & 2 deletions src/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,15 +102,16 @@ class Daemon {
_startDaemon (options) {
return new Promise((resolve, reject) => {
let execOptions
const addr = this._addr.toString()

// TODO refactor this once we daemon supports a json config
if (this._type === 'go') {
execOptions = ['-listen', this._addr]
execOptions = ['-listen', addr]

options.dht && execOptions.push('-dht')
options.pubsub && execOptions.push('-pubsub')
} else {
execOptions = ['--listen', this._addr]
execOptions = ['--listen', addr]

options.dht && execOptions.push('--dht')
options.pubsub && execOptions.push('--pubsub')
Expand Down

0 comments on commit d27a4c3

Please sign in to comment.