feat(doctor): add repair/force flows
This commit is contained in:
@@ -552,7 +552,9 @@ function printDaemonStatus(status: DaemonStatus, opts: { json: boolean }) {
|
||||
const detail = issue.detail ? ` (${issue.detail})` : "";
|
||||
defaultRuntime.error(`Service config issue: ${issue.message}${detail}`);
|
||||
}
|
||||
defaultRuntime.error('Recommendation: run "clawdbot doctor".');
|
||||
defaultRuntime.error(
|
||||
'Recommendation: run "clawdbot doctor" (or "clawdbot doctor --repair").',
|
||||
);
|
||||
}
|
||||
if (status.config) {
|
||||
const cliCfg = `${status.config.cli.path}${status.config.cli.exists ? "" : " (missing)"}${status.config.cli.valid ? "" : " (invalid)"}`;
|
||||
|
||||
@@ -328,6 +328,8 @@ export function buildProgram() {
|
||||
false,
|
||||
)
|
||||
.option("--yes", "Accept defaults without prompting", false)
|
||||
.option("--repair", "Apply recommended repairs without prompting", false)
|
||||
.option("--force", "Apply aggressive repairs (overwrites custom service config)", false)
|
||||
.option(
|
||||
"--non-interactive",
|
||||
"Run without prompts (safe migrations only)",
|
||||
@@ -339,6 +341,8 @@ export function buildProgram() {
|
||||
await doctorCommand(defaultRuntime, {
|
||||
workspaceSuggestions: opts.workspaceSuggestions,
|
||||
yes: Boolean(opts.yes),
|
||||
repair: Boolean(opts.repair),
|
||||
force: Boolean(opts.force),
|
||||
nonInteractive: Boolean(opts.nonInteractive),
|
||||
deep: Boolean(opts.deep),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user