Merge pull request #86 from sc-forks/testrpc-path-detection

Verify testrpc-sc location in node_modules
pull/89/head
c-g-e-w-e-k-e- 7 years ago committed by GitHub
commit 1eff31fb79
  1. 9
      lib/app.js

@ -128,9 +128,16 @@ class App {
launchTestrpc() {
return new Promise((resolve, reject) => {
if (!this.norpc) {
let command;
const defaultRpcOptions = `--gasLimit ${gasLimitHex} --accounts ${this.accounts} --port ${this.port}`;
const options = this.testrpcOptions || defaultRpcOptions;
const command = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js ';
const npm = './node_modules/.bin/testrpc-sc';
const yarn = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js';
shell.test('-e', yarn)
? command = `${yarn} `
: command = `${npm} `;
// Launch
this.testrpcProcess = childprocess.exec(command + options, null, (err, stdout, stderr) => {

Loading…
Cancel
Save