mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-11 13:20:43 +00:00
fix(cli): clarify remaining required options
This commit is contained in:
@@ -4,6 +4,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";
|
||||
import type { GatewayRpcOpts } from "./gateway-rpc.js";
|
||||
import { addGatewayClientOptions, callGatewayFromCli } from "./gateway-rpc.js";
|
||||
|
||||
@@ -62,7 +63,9 @@ export function registerSystemCli(program: Command) {
|
||||
async () => {
|
||||
const text = normalizeOptionalString(opts.text) ?? "";
|
||||
if (!text) {
|
||||
throw new Error("--text is required");
|
||||
throw new Error(
|
||||
`--text is required. Example: ${formatCliCommand('openclaw system event --text "deploy finished"')}.`,
|
||||
);
|
||||
}
|
||||
const mode = normalizeWakeMode(opts.mode);
|
||||
return await callGatewayFromCli("wake", opts, { mode, text }, { expectFinal: false });
|
||||
|
||||
Reference in New Issue
Block a user