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

@@ -96,6 +96,14 @@ export async function runOnboardingWizard(
);
}
if (!snapshot.valid) {
await prompter.outro(
"Config invalid. Run `clawdbot doctor` to repair it, then re-run onboarding.",
);
runtime.exit(1);
return;
}
const action = (await prompter.select({
message: "Config handling",
options: [
@@ -124,8 +132,6 @@ export async function runOnboardingWizard(
})) as ResetScope;
await handleReset(resetScope, resolveUserPath(workspaceDefault), runtime);
baseConfig = {};
} else if (action === "keep" && !snapshot.valid) {
baseConfig = {};
}
}