Skip to content

Commit

Permalink
Simplify terminal util
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Apr 3, 2024
1 parent e8ccda2 commit 7bd51d0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/ethernaut-common/src/test/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,21 @@ 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,
'../../../../',
'node_modules/.bin/hardhat',
)
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' })

Expand Down

0 comments on commit 7bd51d0

Please sign in to comment.