refactor: error handling for run-tool/run-agent scripts (#133)

This commit is contained in:
sigoden
2024-11-30 18:15:41 +08:00
committed by GitHub
parent d2a537c374
commit 2afd0fc19e
5 changed files with 11 additions and 27 deletions
+4 -8
View File
@@ -180,11 +180,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);
});