mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 17:20:43 +00:00
fix(cli): skip startup work for positional help
This commit is contained in:
@@ -2,7 +2,7 @@ import type { Command } from "commander";
|
||||
import { setVerbose } from "../../globals.js";
|
||||
import type { LogLevel } from "../../logging/levels.js";
|
||||
import { defaultRuntime } from "../../runtime.js";
|
||||
import { getVerboseFlag, hasHelpOrVersion } from "../argv.js";
|
||||
import { getVerboseFlag, isHelpOrVersionInvocation } from "../argv.js";
|
||||
import { resolveCliName } from "../cli-name.js";
|
||||
import {
|
||||
applyCliExecutionStartupPresentation,
|
||||
@@ -65,7 +65,7 @@ export function registerPreActionHooks(program: Command, programVersion: string)
|
||||
program.hook("preAction", async (_thisCommand, actionCommand) => {
|
||||
setProcessTitleForCommand(actionCommand);
|
||||
const argv = process.argv;
|
||||
if (hasHelpOrVersion(argv)) {
|
||||
if (isHelpOrVersionInvocation(argv)) {
|
||||
return;
|
||||
}
|
||||
const jsonOutputMode = isCommandJsonOutputMode(actionCommand, argv);
|
||||
|
||||
Reference in New Issue
Block a user