diff options
| author | sigoden <sigoden@gmail.com> | 2024-11-30 18:15:41 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-11-30 18:15:41 +0800 |
| commit | 2afd0fc19e3597d7736a6c7a12617f2fc25752c6 (patch) | |
| tree | 8e3311fa1089b371cb1c8bf4061facd98aa46569 /scripts/run-tool.js | |
| parent | d2a537c3743963bfb6add44731dd3f3f6c785a2e (diff) | |
| download | llm-functions-docker-2afd0fc19e3597d7736a6c7a12617f2fc25752c6.tar.gz | |
refactor: error handling for run-tool/run-agent scripts (#133)
Diffstat (limited to 'scripts/run-tool.js')
| -rwxr-xr-x | scripts/run-tool.js | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/scripts/run-tool.js b/scripts/run-tool.js index 3a1c86e..1e67c3c 100755 --- a/scripts/run-tool.js +++ b/scripts/run-tool.js @@ -163,11 +163,7 @@ async function dumpResult() { process.stdout.write(`\x1b[2m----------------------\n${data}\n----------------------\x1b[0m\n`); } -(async () => { - try { - await main(); - } catch (err) { - console.error(err?.message || err); - process.exit(1); - } -})(); +main().catch((err) => { + console.error(err); + process.exit(1); +});
\ No newline at end of file |
