mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 23:51:38 +00:00
refactor: normalize cli command hints
This commit is contained in:
@@ -4,6 +4,7 @@ import { registerSkillsChangeListener } from "../agents/skills/refresh.js";
|
||||
import type { CanvasHostServer } from "../canvas-host/server.js";
|
||||
import { type ChannelId, listChannelPlugins } from "../channels/plugins/index.js";
|
||||
import { createDefaultDeps } from "../cli/deps.js";
|
||||
import { formatCliCommand } from "../cli/command-format.js";
|
||||
import {
|
||||
CONFIG_PATH_CLAWDBOT,
|
||||
isNixMode,
|
||||
@@ -155,7 +156,7 @@ export async function startGatewayServer(
|
||||
const { config: migrated, changes } = migrateLegacyConfig(configSnapshot.parsed);
|
||||
if (!migrated) {
|
||||
throw new Error(
|
||||
'Legacy config entries detected but auto-migration failed. Run "clawdbot doctor" to migrate.',
|
||||
`Legacy config entries detected but auto-migration failed. Run "${formatCliCommand("clawdbot doctor")}" to migrate.`,
|
||||
);
|
||||
}
|
||||
await writeConfigFile(migrated);
|
||||
@@ -177,7 +178,7 @@ export async function startGatewayServer(
|
||||
.join("\n")
|
||||
: "Unknown validation issue.";
|
||||
throw new Error(
|
||||
`Invalid config at ${configSnapshot.path}.\n${issues}\nRun "clawdbot doctor" to repair, then retry.`,
|
||||
`Invalid config at ${configSnapshot.path}.\n${issues}\nRun "${formatCliCommand("clawdbot doctor")}" to repair, then retry.`,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user