Error handling bugfix: pass #1

This commit is contained in:
2026-10-02 07:04:22 +01:00
parent 39a5e91eeb
commit d8ea4f8e02
53 changed files with 1179 additions and 410 deletions
+5 -1
View File
@@ -14,6 +14,10 @@ export default async function grabConfig() {
return config;
}
catch (error) {
return undefined;
// A config that fails to load (syntax error, bad export) must not be
// silently replaced by defaults — the app would run with the wrong
// configuration and nothing would explain why.
const { CONFIG_FILE } = grabDirNames();
exitWithError(`Failed to load config file \`${CONFIG_FILE}\`: ${error?.message || error}`);
}
}