Load encryption file dynamically

This commit is contained in:
Owen
2025-10-15 17:14:24 -07:00
parent 216ded3034
commit ef32f3ed5a
3 changed files with 51 additions and 25 deletions

View File

@@ -172,6 +172,12 @@ export function readPrivateConfigFile() {
return {};
}
// test if the config file is there
if (!fs.existsSync(privateConfigFilePath1)) {
// load the default values of the zod schema and return those
return privateConfigSchema.parse({});
}
const loadConfig = (configPath: string) => {
try {
const yamlContent = fs.readFileSync(configPath, "utf8");