From 782fdfe8bed0d53ee9005fdc1f1ebf01799be106 Mon Sep 17 00:00:00 2001 From: Iuri Matias Date: Thu, 23 Aug 2018 10:15:06 -0400 Subject: [PATCH] display error & exit if passed filepath is invalid --- remix-tests/src/run.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/remix-tests/src/run.js b/remix-tests/src/run.js index 2412c9cf70..e0aefb97f6 100644 --- a/remix-tests/src/run.js +++ b/remix-tests/src/run.js @@ -48,6 +48,11 @@ commander web3.setProvider(new Provider()) // 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() RemixTests.runTestFiles(filename, isDirectory, web3) })