Embark's own ganache-cli will always be found

This commit is contained in:
Michael Bradley, Jr 2018-07-11 13:01:27 -05:00 committed by Iuri Matias
parent e0ff8a735d
commit f5464b691f
1 changed files with 9 additions and 7 deletions

View File

@ -15,11 +15,11 @@ class Simulator {
const testrpc = shelljs.which('testrpc');
const ganache = shelljs.which('ganache-cli-embark');
if (!testrpc && !ganache) {
this.logger.warn(__('%s is not installed on your machine', 'Ganache CLI (TestRPC)'));
this.logger.info(__('You can install it by running: %s', 'npm -g install ganache-cli'));
process.exit();
}
// if (!testrpc && !ganache) {
// this.logger.warn(__('%s is not installed on your machine', 'Ganache CLI (TestRPC)'));
// this.logger.info(__('You can install it by running: %s', 'npm -g install ganache-cli'));
// process.exit();
// }
let useProxy = this.blockchainConfig.proxy || false;
let host = (dockerHostSwap(options.host || this.blockchainConfig.rpcHost) || defaultHost);
@ -45,8 +45,10 @@ class Simulator {
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
}
const programName = ganache ? 'ganache-cli' : 'testrpc';
const program = ganache ? ganache : testrpc;
// const programName = ganache ? 'ganache-cli' : 'testrpc';
// const program = ganache ? ganache : testrpc;
const programName = 'ganache-cli';
const program = ganache;
console.log(`running: ${programName} ${cmds.join(' ')}`);
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});