aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/run-tool.js
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/run-tool.js')
-rwxr-xr-xscripts/run-tool.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/run-tool.js b/scripts/run-tool.js
index 4a806f3..3a1c86e 100755
--- a/scripts/run-tool.js
+++ b/scripts/run-tool.js
@@ -28,10 +28,15 @@ function parseArgv(thisFileName) {
toolData = process.argv[2];
}
- if (toolName.endsWith(".js")) {
+ if (toolName && toolName.endsWith(".js")) {
toolName = toolName.slice(0, -3);
}
+ if (!toolData || !toolName) {
+ console.log(`Usage: ./run-tools.js <tool-name> <tool-data>`);
+ process.exit(1);
+ }
+
return [toolName, toolData];
}