Merge pull request #237 from vdrg/feature/resolve-testrpc

Use require.resolve() to get the path of testrpc-sc
pull/254/head
c-g-e-w-e-k-e- 7 years ago committed by GitHub
commit b0834d0614
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      lib/app.js

@ -176,11 +176,11 @@ class App {
if (!this.norpc) {
const defaultRpcOptions = `--accounts ${this.accounts} --port ${this.port}`;
const options = (this.testrpcOptions || defaultRpcOptions) + ` --gasLimit ${gasLimitHex}`;
const command = './node_modules/ethereumjs-testrpc-sc/build/cli.node.js ';
const command = require.resolve('ethereumjs-testrpc-sc/build/cli.node.js');
// Launch
const execOpts = {maxBuffer: 1024 * 1024 * 10};
this.testrpcProcess = childprocess.exec(command + options, execOpts, (err, stdout, stderr) => {
this.testrpcProcess = childprocess.exec(`${command} ${options}`, execOpts, (err, stdout, stderr) => {
if (err) {
if (stdout) this.log(`testRpc stdout:\n${stdout}`);
if (stderr) this.log(`testRpc stderr:\n${stderr}`);

Loading…
Cancel
Save