fix(config): require doctor for invalid configs (#764 — thanks @mukhtharcm)

This commit is contained in:
Peter Steinberger
2026-01-13 01:18:18 +00:00
parent 20ba8d4891
commit 231d2d5fdf
7 changed files with 80 additions and 11 deletions

View File

@@ -287,6 +287,10 @@ export function createConfigIO(overrides: ConfigIoDeps = {}) {
}
const legacyIssues = findLegacyConfigIssues(resolved);
const resolvedConfig =
typeof resolved === "object" && resolved !== null
? (resolved as ClawdbotConfig)
: {};
const validated = validateConfigObject(resolved);
if (!validated.ok) {
@@ -296,7 +300,7 @@ export function createConfigIO(overrides: ConfigIoDeps = {}) {
raw,
parsed: parsedRes.parsed,
valid: false,
config: resolved as ClawdbotConfig,
config: resolvedConfig,
issues: validated.issues,
legacyIssues,
};