Skip to content

Commit e259220

Browse files
committed
fix(config): restore catch-all in readConfig to prevent CLI crash on malformed config
1 parent c0d24cc commit e259220

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/config.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,8 @@ export async function readConfig(): Promise<CodeburnConfig> {
3333
try {
3434
const raw = await readFile(getConfigPath(), 'utf-8')
3535
return JSON.parse(raw) as CodeburnConfig
36-
} catch (error) {
37-
if ((error as NodeJS.ErrnoException).code === 'ENOENT') {
38-
return {}
39-
}
40-
throw error
36+
} catch {
37+
return {}
4138
}
4239
}
4340

0 commit comments

Comments
 (0)