diff options
Diffstat (limited to 'scripts/run-agent.js')
| -rwxr-xr-x | scripts/run-agent.js | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/scripts/run-agent.js b/scripts/run-agent.js index 6a14990..48096c7 100755 --- a/scripts/run-agent.js +++ b/scripts/run-agent.js @@ -106,15 +106,10 @@ async function loadEnv(filePath) { } async function run(agentName, agentPath, agentFunc, agentData) { - let mod; if (os.platform() === "win32") { agentPath = `file://${agentPath}`; } - try { - mod = await import(agentPath); - } catch { - throw new Error(`Unable to load agent tools at '${agentPath}'`); - } + const mod = await import(agentPath); if (!mod || !mod[agentFunc]) { throw new Error(`Not module function '${agentFunc}' at '${agentPath}'`); } |
