refactor: normalize cli command hints
This commit is contained in:
@@ -8,6 +8,7 @@ import {
|
||||
readConfigFileSnapshot,
|
||||
} from "../config/config.js";
|
||||
import { applyPluginAutoEnable } from "../config/plugin-auto-enable.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import { note } from "../terminal/note.js";
|
||||
import { normalizeLegacyConfigValues } from "./doctor-legacy-config.js";
|
||||
import type { DoctorOptions } from "./doctor-prompter.js";
|
||||
@@ -139,7 +140,10 @@ export async function loadAndMaybeMigrateDoctorConfig(params: {
|
||||
if (changes.length > 0) note(changes.join("\n"), "Doctor changes");
|
||||
if (migrated) cfg = migrated;
|
||||
} else {
|
||||
note('Run "clawdbot doctor --fix" to apply legacy migrations.', "Doctor");
|
||||
note(
|
||||
`Run "${formatCliCommand("clawdbot doctor --fix")}" to apply legacy migrations.`,
|
||||
"Doctor",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -149,7 +153,7 @@ export async function loadAndMaybeMigrateDoctorConfig(params: {
|
||||
if (shouldRepair) {
|
||||
cfg = normalized.config;
|
||||
} else {
|
||||
note('Run "clawdbot doctor --fix" to apply these changes.', "Doctor");
|
||||
note(`Run "${formatCliCommand("clawdbot doctor --fix")}" to apply these changes.`, "Doctor");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -159,7 +163,7 @@ export async function loadAndMaybeMigrateDoctorConfig(params: {
|
||||
if (shouldRepair) {
|
||||
cfg = autoEnable.config;
|
||||
} else {
|
||||
note('Run "clawdbot doctor --fix" to apply these changes.', "Doctor");
|
||||
note(`Run "${formatCliCommand("clawdbot doctor --fix")}" to apply these changes.`, "Doctor");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user