Merge pull request #933 from ethereum/fix_invalid_dir

display error & exit if passed filepath is invalid
pull/5370/head
yann300 6 years ago committed by GitHub
commit 040d15ca0b
  1. 5
      remix-tests/src/run.js

@ -48,6 +48,11 @@ commander
web3.setProvider(new Provider()) web3.setProvider(new Provider())
// web3.setProvider(new web3.providers.WebsocketProvider('ws://localhost:8546')) // web3.setProvider(new web3.providers.WebsocketProvider('ws://localhost:8546'))
if (!fs.existsSync(filename)) {
console.error(filename + ' not found')
process.exit(1)
}
let isDirectory = fs.lstatSync(filename).isDirectory() let isDirectory = fs.lstatSync(filename).isDirectory()
RemixTests.runTestFiles(filename, isDirectory, web3) RemixTests.runTestFiles(filename, isDirectory, web3)
}) })

Loading…
Cancel
Save