Skip to content

Commit

Permalink
Merge pull request #426 from odilitime/stable-11-17
Browse files Browse the repository at this point in the history
fix: don't continue to load if a specified file is not found
  • Loading branch information
ponderingdemocritus authored Nov 20, 2024
2 parents 17215f0 + 215ba63 commit 4154da2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/agent/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export async function loadCharacters(
}
return path;
});

const loadedCharacters = [];

if (characterPaths?.length > 0) {
Expand All @@ -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)
}
}
}
Expand Down

0 comments on commit 4154da2

Please sign in to comment.