fix: specify full path for password files (geth)

This commit is contained in:
Andre Medeiros 2019-02-19 09:44:23 -05:00 committed by Pascal Precht
parent e6eea1df06
commit c1d08c667a
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,7 @@
const async = require('async'); const async = require('async');
const {exec, spawn} = require('child_process'); const {exec, spawn} = require('child_process');
const fs = require('../../core/fs'); const fs = require('../../core/fs');
const path = require('path');
const GethMiner = require('./miner'); const GethMiner = require('./miner');
const semver = require('semver'); const semver = require('semver');
const constants = require('../../constants'); const constants = require('../../constants');
@ -73,7 +74,8 @@ class GethClient {
} }
if (config.account && config.account.password) { if (config.account && config.account.password) {
cmd.push(`--password=${config.account.password}`); const resolvedPath = path.resolve(fs.dappPath(), config.account.password);
cmd.push(`--password=${resolvedPath}`);
} }
if (Number.isInteger(config.verbosity) && config.verbosity >= 0 && config.verbosity <= 5) { if (Number.isInteger(config.verbosity) && config.verbosity >= 0 && config.verbosity <= 5) {