fix(config): require doctor for invalid configs (#764 — thanks @mukhtharcm)
This commit is contained in:
@@ -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 = {};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user