fix(scripts): reject short flag extension memory values · openclaw/openclaw@b77d614
vincentkoc
·
2026-06-22
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -103,6 +103,21 @@ describe("scripts/profile-extension-memory", () => {
|
103 | 103 | } |
104 | 104 | }); |
105 | 105 | |
| 106 | +it("rejects option-looking string flag values before scanning built plugin artifacts", () => { |
| 107 | +for (const args of [ |
| 108 | +["--extension", "-h"], |
| 109 | +["--json", "-h"], |
| 110 | +]) { |
| 111 | +const result = runProfileExtensionMemory(args); |
| 112 | + |
| 113 | +expect(result.status).toBe(1); |
| 114 | +expect(result.stdout).toBe(""); |
| 115 | +expect(result.stderr).toContain(`[extension-memory] ${args[0]} requires a value`); |
| 116 | +expect(result.stderr).not.toContain("dist/extensions"); |
| 117 | +expect(result.stderr).not.toContain("at "); |
| 118 | +} |
| 119 | +}); |
| 120 | + |
106 | 121 | it("bounds noisy child output without losing RSS samples", () => { |
107 | 122 | const root = mkdtempSync(path.join(tmpdir(), "openclaw-extension-memory-test-")); |
108 | 123 | try { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。