mirror of https://github.com/embarklabs/embark.git
Embark's own ganache-cli will always be found
This commit is contained in:
parent
2784303145
commit
e1aee21d08
|
@ -14,11 +14,11 @@ class Simulator {
|
||||||
|
|
||||||
const testrpc = shelljs.which('testrpc');
|
const testrpc = shelljs.which('testrpc');
|
||||||
const ganache = shelljs.which('ganache-cli-embark');
|
const ganache = shelljs.which('ganache-cli-embark');
|
||||||
if (!testrpc && !ganache) {
|
// if (!testrpc && !ganache) {
|
||||||
this.logger.warn(__('%s is not installed on your machine', 'Ganache CLI (TestRPC)'));
|
// 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'));
|
// this.logger.info(__('You can install it by running: %s', 'npm -g install ganache-cli'));
|
||||||
process.exit();
|
// process.exit();
|
||||||
}
|
// }
|
||||||
|
|
||||||
let useProxy = this.blockchainConfig.proxy || false;
|
let useProxy = this.blockchainConfig.proxy || false;
|
||||||
let host = (options.host || this.blockchainConfig.rpcHost || 'localhost');
|
let host = (options.host || this.blockchainConfig.rpcHost || 'localhost');
|
||||||
|
@ -44,8 +44,10 @@ class Simulator {
|
||||||
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
|
cmds.push("-b \"" + (simulatorBlocktime) +"\"");
|
||||||
}
|
}
|
||||||
|
|
||||||
const programName = ganache ? 'ganache-cli' : 'testrpc';
|
// const programName = ganache ? 'ganache-cli' : 'testrpc';
|
||||||
const program = ganache ? ganache : testrpc;
|
// const program = ganache ? ganache : testrpc;
|
||||||
|
const programName = 'ganache-cli';
|
||||||
|
const program = ganache;
|
||||||
console.log(`running: ${programName} ${cmds.join(' ')}`);
|
console.log(`running: ${programName} ${cmds.join(' ')}`);
|
||||||
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});
|
shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue