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
parent 2c43ec1ad0
commit 0803005083

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 {}
}
}