Skip to content

Commit

Permalink
fix: pass private key as cli arg instead of env var
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Aug 27, 2018
1 parent edaf163 commit 8765395
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ipfsd-daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class Daemon {
this._started = false
this.api = null
this.bits = this.opts.initOptions ? this.opts.initOptions.bits : null
this._env = Object.assign({}, process.env, this.opts.env, this.disposable ? {IPFS_PREGENERATED_PRIVATE_KEY: testIds()} : {})
this._env = Object.assign({}, process.env, this.opts.env)
}

/**
Expand Down Expand Up @@ -169,7 +169,11 @@ class Daemon {
if (bits) {
args.push('-b')
args.push(bits)
} else if (this.disposable) {
args.push('--private-key')
args.push(testIds())
}

if (initOptions.pass) {
args.push('--pass')
args.push('"' + initOptions.pass + '"')
Expand Down

0 comments on commit 8765395

Please sign in to comment.