fix(cli): correct --verbose / -v option syntax in acp commands (#21303)

Merged via /review-pr -> /prepare-pr -> /merge-pr.

Prepared head SHA: 20d058dcf524765f53681b601f605b0d4b3129f3
Co-authored-by: adhitShet <[email protected]>
Co-authored-by: gumadeiras <[email protected]>
Reviewed-by: @gumadeiras
This commit is contained in:
adhitShet
2026-02-19 21:04:22 -05:00
committed by GitHub
parent 9264a8e21a
commit 164d478652
8 changed files with 120 additions and 8 deletions
+4 -3
View File
@@ -2,6 +2,7 @@ import type { Command } from "commander";
import { formatDocsLink } from "../../terminal/links.js";
import { isRich, theme } from "../../terminal/theme.js";
import { escapeRegExp } from "../../utils.js";
import { hasFlag, hasRootVersionAlias } from "../argv.js";
import { formatCliBannerLine, hasEmittedCliBanner } from "../banner.js";
import { replaceCliName, resolveCliName } from "../cli-name.js";
import { getCoreCliCommandsWithSubcommands } from "./command-registry.js";
@@ -98,9 +99,9 @@ export function configureProgramHelp(program: Command, ctx: ProgramContext) {
});
if (
process.argv.includes("-V") ||
process.argv.includes("--version") ||
process.argv.includes("-v")
hasFlag(process.argv, "-V") ||
hasFlag(process.argv, "--version") ||
hasRootVersionAlias(process.argv)
) {
console.log(ctx.programVersion);
process.exit(0);