Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't continue to load if a specified file is not found #426

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
don't continue to load if a specified file is not found
  • Loading branch information
odilitime committed Nov 20, 2024
commit 215ba63d65402d148a9a24c2e8e0c968b56215c6
3 changes: 2 additions & 1 deletion packages/agent/src/index.ts
Original file line number Diff line number Diff line change
@@ -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)
}
}
}
Loading