From 215ba63d65402d148a9a24c2e8e0c968b56215c6 Mon Sep 17 00:00:00 2001 From: odilitime Date: Wed, 20 Nov 2024 02:29:29 +0000 Subject: [PATCH] don't continue to load if a specified file is not found --- packages/agent/src/index.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/agent/src/index.ts b/packages/agent/src/index.ts index 67ce3b99e6..756b92c1de 100644 --- a/packages/agent/src/index.ts +++ b/packages/agent/src/index.ts @@ -69,7 +69,6 @@ export async function loadCharacters( } return path; }); - const loadedCharacters = []; if (characterPaths?.length > 0) { @@ -96,6 +95,8 @@ export async function loadCharacters( loadedCharacters.push(character); } catch (e) { console.error(`Error loading character from ${path}: ${e}`); + // don't continue to load if a specified file is not found + process.exit(1) } } }