mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-26 18:53:31 +00:00
CLI: dedupe config validate errors and expose allowed values
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
resolveGatewayPort,
|
||||
writeConfigFile,
|
||||
} from "../../config/config.js";
|
||||
import { formatConfigIssueLines } from "../../config/issue-format.js";
|
||||
import { resolveGatewayService } from "../../daemon/service.js";
|
||||
import {
|
||||
channelToNpmTag,
|
||||
@@ -655,7 +656,7 @@ export async function updateCommand(opts: UpdateCommandOptions): Promise<void> {
|
||||
return;
|
||||
}
|
||||
if (opts.channel && !configSnapshot.valid) {
|
||||
const issues = configSnapshot.issues.map((issue) => `- ${issue.path}: ${issue.message}`);
|
||||
const issues = formatConfigIssueLines(configSnapshot.issues, "-");
|
||||
defaultRuntime.error(["Config is invalid; cannot set update channel.", ...issues].join("\n"));
|
||||
defaultRuntime.exit(1);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user