mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-07 04:21:38 +00:00
fix(cli): correct --verbose / -v option syntax in acp commands (#21303)
Merged via /review-pr -> /prepare-pr -> /merge-pr.
Prepared head SHA: 20d058dcf5
Co-authored-by: adhitShet <131381638+adhitShet@users.noreply.github.com>
Co-authored-by: gumadeiras <5599352+gumadeiras@users.noreply.github.com>
Reviewed-by: @gumadeiras
This commit is contained in:
@@ -29,6 +29,31 @@ describe("argv helpers", () => {
|
||||
argv: ["node", "openclaw", "status"],
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "root -v alias",
|
||||
argv: ["node", "openclaw", "-v"],
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "root -v alias with profile",
|
||||
argv: ["node", "openclaw", "--profile", "work", "-v"],
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "subcommand -v should not be treated as version",
|
||||
argv: ["node", "openclaw", "acp", "-v"],
|
||||
expected: false,
|
||||
},
|
||||
{
|
||||
name: "root -v alias with equals profile",
|
||||
argv: ["node", "openclaw", "--profile=work", "-v"],
|
||||
expected: true,
|
||||
},
|
||||
{
|
||||
name: "subcommand path after global root flags should not be treated as version",
|
||||
argv: ["node", "openclaw", "--dev", "skills", "list", "-v"],
|
||||
expected: false,
|
||||
},
|
||||
])("detects help/version flags: $name", ({ argv, expected }) => {
|
||||
expect(hasHelpOrVersion(argv)).toBe(expected);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user