mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 03:51:25 +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:
@@ -44,10 +44,12 @@ describe("shouldRegisterPrimarySubcommand", () => {
|
||||
it("skips eager primary registration for help/version invocations", () => {
|
||||
expect(shouldRegisterPrimarySubcommand(["node", "openclaw", "status", "--help"])).toBe(false);
|
||||
expect(shouldRegisterPrimarySubcommand(["node", "openclaw", "-V"])).toBe(false);
|
||||
expect(shouldRegisterPrimarySubcommand(["node", "openclaw", "-v"])).toBe(false);
|
||||
});
|
||||
|
||||
it("keeps eager primary registration for regular command runs", () => {
|
||||
expect(shouldRegisterPrimarySubcommand(["node", "openclaw", "status"])).toBe(true);
|
||||
expect(shouldRegisterPrimarySubcommand(["node", "openclaw", "acp", "-v"])).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -107,6 +109,7 @@ describe("shouldEnsureCliPath", () => {
|
||||
it("skips path bootstrap for help/version invocations", () => {
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "--help"])).toBe(false);
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "-V"])).toBe(false);
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "-v"])).toBe(false);
|
||||
});
|
||||
|
||||
it("skips path bootstrap for read-only fast paths", () => {
|
||||
@@ -119,5 +122,6 @@ describe("shouldEnsureCliPath", () => {
|
||||
it("keeps path bootstrap for mutating or unknown commands", () => {
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "message", "send"])).toBe(true);
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "voicecall", "status"])).toBe(true);
|
||||
expect(shouldEnsureCliPath(["node", "openclaw", "acp", "-v"])).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user