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, 1 insertions, 6 deletions
diff --git a/scripts/run-tool.js b/scripts/run-tool.js
index ea0b3a5..841fbc0 100755
--- a/scripts/run-tool.js
+++ b/scripts/run-tool.js
@@ -93,15 +93,10 @@ async function loadEnv(filePath) {
}
async function run(toolName, toolPath, toolFunc, toolData) {
- let mod;
if (os.platform() === "win32") {
toolPath = `file://${toolPath}`;
}
- try {
- mod = await import(toolPath);
- } catch {
- throw new Error(`Unable to load tool at '${toolPath}'`);
- }
+ const mod = await import(toolPath);
if (!mod || !mod[toolFunc]) {
throw new Error(`Not module function '${toolFunc}' at '${toolPath}'`);
}