惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
云风的 BLOG
云风的 BLOG
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
D
Docker
H
Help Net Security
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
月光博客
月光博客
C
Check Point Blog
S
SegmentFault 最新的问题
T
The Blog of Author Tim Ferriss
J
Java Code Geeks
M
MIT News - Artificial intelligence
B
Blog RSS Feed
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Hugging Face - Blog
Hugging Face - Blog
腾讯CDC
美团技术团队
I
InfoQ
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to openclaw:main

test: merge chat side-result checks · openclaw/openclaw@ddd2c2a test: merge cron history checks · openclaw/openclaw@f7eb746 test: merge responsive navigation shell checks · openclaw/openclaw@c2e4b47 docs(changelog): add codex oauth fixes · openclaw/openclaw@628e6cd test: merge navigation routing cases · openclaw/openclaw@5d8cecb Tests: mock channel registry bundled fallback · openclaw/openclaw@2b08233 Secrets: avoid broad web search discovery for single plugin config · openclaw/openclaw@a464f59 test: merge config view browser checks · openclaw/openclaw@20cf511 fix(status): align oauth health with runtime · openclaw/openclaw@eed7116 feat: add macOS screen snapshots for monitor preview (#67954) thanks … · openclaw/openclaw@f377db1 fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev · openclaw/openclaw@0b6c39b Auto-reply: avoid eager bundled route fallback · openclaw/openclaw@3ea1bf4 Tests: narrow session binding contract setup · openclaw/openclaw@54e4e16 fix(macOS): enable undo/redo in webchat composer text input (#34962) · openclaw/openclaw@00951dc Tests: speed up channel setup promotion · openclaw/openclaw@82b529a Docs: refresh agent instructions · openclaw/openclaw@5775fe2 fix(auth): serialize OAuth refresh across agents to fix #26322 (#67876) · openclaw/openclaw@8e79080 test: allow ollama public surface boundary test · openclaw/openclaw@7d4f1a6 Docs: add test performance guardrails · openclaw/openclaw@89706d3 Tests: restore context-engine usage proof · openclaw/openclaw@e4c4f95 Tests: slim context engine runtime coverage · openclaw/openclaw@74c198f ci: retry failed custom checkouts · openclaw/openclaw@0ee5baf test: trim duplicate provider auth onboarding cases · openclaw/openclaw@1ffc02e matrix: fix sessions_spawn --thread subagent session spawning (#67643) · openclaw/openclaw@1ce2596 test: reduce auth choice fixture churn · openclaw/openclaw@857b9cd test: mock health status config boundaries · openclaw/openclaw@9d5ab4a test: mock onboard config io boundary · openclaw/openclaw@299694d test: mock legacy state plugin boundaries · openclaw/openclaw@2713089 test: mock channel install boundaries · openclaw/openclaw@b945248 test: mock doctor preview channel boundaries · openclaw/openclaw@b1a3ad4
fix(scripts): reject short flag values in release docs pa...
vincentkoc · 2026-06-22 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -83,7 +83,7 @@ function parseArgs(argv) {

8383
8484

function readOptionValue(argv, index, option) {

8585

const value = argv[index + 1] ?? "";

86-

if (!value || value.startsWith("--")) {

86+

if (!value || value.startsWith("-")) {

8787

throw new Error(`Missing value for ${option}.`);

8888

}

8989

return value;

Original file line numberDiff line numberDiff line change

@@ -94,7 +94,7 @@ function parsePositiveIntegerArg(raw, label) {

9494
9595

function readRequiredValue(argv, index, label) {

9696

const value = argv[index + 1];

97-

if (!value || value.startsWith("--")) {

97+

if (!value || value.startsWith("-")) {

9898

throw new Error(`${label} requires a value`);

9999

}

100100

return value;

@@ -116,7 +116,10 @@ export function parseArgs(argv) {

116116

continue;

117117

}

118118

if (part === "--max-errors") {

119-

maxErrors = parsePositiveIntegerArg(argv[index + 1], "--max-errors");

119+

maxErrors = parsePositiveIntegerArg(

120+

readRequiredValue(argv, index, "--max-errors"),

121+

"--max-errors",

122+

);

120123

index += 1;

121124

continue;

122125

}

Original file line numberDiff line numberDiff line change

@@ -59,7 +59,7 @@ function parseArgs(argv) {

5959
6060

function readOptionValue(argv, index, option) {

6161

const value = argv[index + 1] ?? "";

62-

if (!value || value.startsWith("--")) {

62+

if (!value || value.startsWith("-")) {

6363

throw new Error(`Missing value for ${option}.`);

6464

}

6565

return value;

Original file line numberDiff line numberDiff line change

@@ -30,12 +30,19 @@ function runNode(args: string[], env: NodeJS.ProcessEnv = {}) {

3030

const e = error as { stdout?: unknown; stderr?: unknown };

3131

return {

3232

ok: false,

33-

stdout: Buffer.isBuffer(e.stdout) ? e.stdout.toString("utf8") : String(e.stdout ?? ""),

34-

stderr: Buffer.isBuffer(e.stderr) ? e.stderr.toString("utf8") : String(e.stderr ?? ""),

33+

stdout: formatProcessOutput(e.stdout),

34+

stderr: formatProcessOutput(e.stderr),

3535

};

3636

}

3737

}

3838
39+

function formatProcessOutput(value: unknown): string {

40+

if (Buffer.isBuffer(value)) {

41+

return value.toString("utf8");

42+

}

43+

return typeof value === "string" ? value : "";

44+

}

45+
3946

function runGit(args: string[], cwd?: string, env: NodeJS.ProcessEnv = {}) {

4047

execFileSync("git", args, {

4148

cwd,

@@ -127,11 +134,17 @@ describe("scripts/android-release-signing.mjs", () => {

127134

it.each([

128135

["--mode"],

129136

["--mode", "--manifest"],

137+

["--mode", "-h"],

130138

["--manifest"],

139+

["--manifest", "-h"],

131140

["--workspace", "--mode"],

141+

["--workspace", "-h"],

132142

["--materialized-dir", "--mode"],

143+

["--materialized-dir", "-h"],

133144

["--keystore", "--mode"],

145+

["--keystore", "-h"],

134146

["--properties", "--mode"],

147+

["--properties", "-h"],

135148

])("rejects missing values for %s before release signing work", (...args) => {

136149

const result = runNode(args);

137150
Original file line numberDiff line numberDiff line change

@@ -20,11 +20,13 @@ describe("scripts/check-docs-mdx", () => {

2020

expect(() => parseArgs(["--max-errors", "0"])).toThrow(

2121

"--max-errors must be a positive integer",

2222

);

23-

expect(() => parseArgs(["--max-errors"])).toThrow("--max-errors must be a positive integer");

23+

expect(() => parseArgs(["--max-errors"])).toThrow("--max-errors requires a value");

24+

expect(() => parseArgs(["--max-errors", "-h"])).toThrow("--max-errors requires a value");

2425

});

2526
2627

it("rejects missing JSON report output paths", () => {

2728

expect(() => parseArgs(["--json-out"])).toThrow("--json-out requires a value");

29+

expect(() => parseArgs(["--json-out", "-h"])).toThrow("--json-out requires a value");

2830

expect(() => parseArgs(["--json-out", "--max-errors", "3"])).toThrow(

2931

"--json-out requires a value",

3032

);

Original file line numberDiff line numberDiff line change

@@ -16,12 +16,19 @@ function runSigningResult(args: string[]): { ok: boolean; stdout: string; stderr

1616

const e = error as { stdout?: unknown; stderr?: unknown };

1717

return {

1818

ok: false,

19-

stdout: Buffer.isBuffer(e.stdout) ? e.stdout.toString("utf8") : String(e.stdout ?? ""),

20-

stderr: Buffer.isBuffer(e.stderr) ? e.stderr.toString("utf8") : String(e.stderr ?? ""),

19+

stdout: formatProcessOutput(e.stdout),

20+

stderr: formatProcessOutput(e.stderr),

2121

};

2222

}

2323

}

2424
25+

function formatProcessOutput(value: unknown): string {

26+

if (Buffer.isBuffer(value)) {

27+

return value.toString("utf8");

28+

}

29+

return typeof value === "string" ? value : "";

30+

}

31+
2532

function runSigning(mode: string): string {

2633

return execFileSync(process.execPath, [SCRIPT, "--mode", mode], {

2734

encoding: "utf8",

@@ -33,7 +40,9 @@ describe("scripts/ios-release-signing.mjs", () => {

3340

it.each([

3441

["--mode"],

3542

["--mode", "--manifest"],

43+

["--mode", "-h"],

3644

["--manifest"],

45+

["--manifest", "-h"],

3746

])("rejects missing values for %s before reading signing manifests", (...args) => {

3847

const result = runSigningResult(args);

3948