From 7bd51d0084bc3fd727457d7c83b6da8a4f10772e Mon Sep 17 00:00:00 2001 From: Alejandro Date: Wed, 3 Apr 2024 11:43:22 -0300 Subject: [PATCH] Simplify terminal util --- packages/ethernaut-common/src/test/terminal.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/ethernaut-common/src/test/terminal.js b/packages/ethernaut-common/src/test/terminal.js index 6166132..dbf31ab 100644 --- a/packages/ethernaut-common/src/test/terminal.js +++ b/packages/ethernaut-common/src/test/terminal.js @@ -27,11 +27,11 @@ class Terminal { async run(command, delay = 10000, killAfter = false) { this.output = '' - const n = path.resolve( - __dirname, - '../../../../', - 'node_modules/nyc/bin/nyc.js', - ) + // const n = path.resolve( + // __dirname, + // '../../../../', + // 'node_modules/nyc/bin/nyc.js', + // ) const h = path.resolve( __dirname, '../../../../', @@ -39,9 +39,9 @@ class Terminal { ) command = command.replace('hardhat', h) const args = command.split(' ') - args.unshift(n, process.execPath) + args.unshift('node') args.concat(['&&', 'sleep', '1', '&&', 'exit']) - const f = process.execPath + const f = 'nyc' debug.log(`Running command: ${f} ${args.join(' ')}`, 'terminal') this.process = spawn(f, args, { shell: true, stdio: 'pipe' })