fix(test): reject attestation platform flags · openclaw/openclaw@5bf459e
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -134,7 +134,7 @@ function inspectRaw(imageRef) {
|
134 | 134 | |
135 | 135 | function readOptionValue(argv, index, optionName) { |
136 | 136 | const value = argv[index + 1]; |
137 | | -if (value === undefined || value === "" || value.startsWith("--")) { |
| 137 | +if (value === undefined || value === "" || value.startsWith("-")) { |
138 | 138 | throw new Error(`${optionName} requires a value`); |
139 | 139 | } |
140 | 140 | return value; |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -69,6 +69,7 @@ describe("verify-docker-attestations", () => {
|
69 | 69 | |
70 | 70 | it("rejects missing platform option values", () => { |
71 | 71 | expect(() => parseArgs(["--platform"])).toThrow("--platform requires a value"); |
| 72 | +expect(() => parseArgs(["--platform", "-h"])).toThrow("--platform requires a value"); |
72 | 73 | expect(() => parseArgs(["--platform", "--help"])).toThrow("--platform requires a value"); |
73 | 74 | expect(() => parseArgs(["--platform", ""])).toThrow("--platform requires a value"); |
74 | 75 | }); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。