fix(config): require doctor for invalid configs (#764 — thanks @mukhtharcm)
This commit is contained in:
1 parent
20ba8d4891
commit
231d2d5fdf
7 files changed
+80
-11
No files matched your search
+5
-1
@@ -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,
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user