fix(config): restore catch-all in readConfig to prevent CLI crash on malformed config

This commit is contained in:
iamtoruk 2026-04-20 15:00:03 -07:00 • committed by AgentSeal
parent c0d24cc191
commit e25922030d

View file

@ -33,11 +33,8 @@ export async function readConfig(): Promise<CodeburnConfig> {
try {
const raw = await readFile(getConfigPath(), 'utf-8')
return JSON.parse(raw) as CodeburnConfig
} catch (error) {
if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
return {}
}
throw error
} catch {
return {}
}
}