fix(docs): reject sync publish flag values · openclaw/openclaw@43e00c0
openclaw
·
2026-06-22
·
via Recent Commits to openclaw:main
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|
@@ -172,7 +172,7 @@ const GENERATED_LOCALES = [
|
172 | 172 | |
173 | 173 | function readOptionValue(argv, index, optionName) { |
174 | 174 | const value = argv[index + 1]; |
175 | | -if (value === undefined || value === "" || value.startsWith("--")) { |
| 175 | +if (value === undefined || value === "" || value.startsWith("-")) { |
176 | 176 | throw new Error(`${optionName} requires a value`); |
177 | 177 | } |
178 | 178 | return value; |
|
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -41,6 +41,7 @@ describe("docs-sync-publish", () => {
|
41 | 41 | expect(() => parseArgs([flag, "--target", "generated-docs"])).toThrow( |
42 | 42 | `${flag} requires a value`, |
43 | 43 | ); |
| 44 | +expect(() => parseArgs([flag, "-h"])).toThrow(`${flag} requires a value`); |
44 | 45 | } |
45 | 46 | }); |
46 | 47 | }); |
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。