fix(scripts): reject short flag TUI PTY values · openclaw/openclaw@dfbc9ab
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -356,6 +356,14 @@ describe("script-specific dev tooling hardening", () => {
|
356 | 356 | expect(result.stdout).toBe(""); |
357 | 357 | }); |
358 | 358 | |
| 359 | +it("rejects short flags as TUI PTY watch option values", () => { |
| 360 | +for (const flag of ["--mode", "--mirror-path"]) { |
| 361 | +expect(() => tuiPtyWatchTesting.parseOptions([flag, "-h"])).toThrow( |
| 362 | +`${flag} requires a value`, |
| 363 | +); |
| 364 | +} |
| 365 | +}); |
| 366 | + |
359 | 367 | it("keeps TUI PTY watch vitest args behind the separator", () => { |
360 | 368 | expect(tuiPtyWatchTesting.parseOptions(["--mode", "all", "--", "--help"])).toMatchObject({ |
361 | 369 | mode: "all", |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。