fix(cli): clarify remaining required options

This commit is contained in:
Vincent Koc
2026-05-09 09:22:04 +08:00
parent 737d5253e5
commit e45b9d7a74
11 changed files with 40 additions and 15 deletions

View File

@@ -20,6 +20,7 @@ import { defaultRuntime } from "../runtime.js";
import { normalizeOptionalString } from "../shared/string-coerce.js";
import { formatDocsLink } from "../terminal/links.js";
import { theme } from "../terminal/theme.js";
import { formatCliCommand } from "./command-format.js";
export function registerWebhooksCli(program: Command) {
const webhooks = program
@@ -109,7 +110,9 @@ function parseGmailSetupOptions(raw: Record<string, unknown>): GmailSetupOptions
const accountRaw = raw.account;
const account = normalizeOptionalString(accountRaw) ?? "";
if (!account) {
throw new Error("--account is required");
throw new Error(
`--account is required. Example: ${formatCliCommand("openclaw webhooks gmail setup --account default")}.`,
);
}
const common = parseGmailCommonOptions(raw);
return {