Skip to content

Commit

Permalink
fix: only find bin if not overridden (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alan Shaw authored Jan 29, 2020
1 parent 09b1917 commit 025c06f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,19 @@ class Factory {

/** @type ControllerOptionsOverrides */
this.overrides = merge({
js: merge(this.opts, { type: 'js', ipfsBin: findBin('js', this.opts.type === 'js') }),
go: merge(this.opts, { type: 'go', ipfsBin: findBin('go', this.opts.type === 'go') }),
proc: merge(this.opts, { type: 'proc', ipfsBin: findBin('js', this.opts.type === 'proc') })
js: merge(this.opts, { type: 'js' }),
go: merge(this.opts, { type: 'go' }),
proc: merge(this.opts, { type: 'proc' })
}, overrides)

if (!this.overrides.js.ipfsBin) {
this.overrides.js.ipfsBin = findBin('js', this.opts.type === 'js')
}

if (!this.overrides.go.ipfsBin) {
this.overrides.go.ipfsBin = findBin('go', this.opts.type === 'go')
}

/** @type ControllerDaemon[] */
this.controllers = []
}
Expand Down

0 comments on commit 025c06f

Please sign in to comment.