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

推荐订阅源

J
Java Code Geeks
美团技术团队
Microsoft Azure Blog
Microsoft Azure Blog
V
Visual Studio Blog
Jina AI
Jina AI
博客园_首页
M
MIT News - Artificial intelligence
D
DataBreaches.Net
L
LangChain Blog
宝玉的分享
宝玉的分享
F
Fortinet All Blogs
A
About on SuperTechFans
月光博客
月光博客
Stack Overflow Blog
Stack Overflow Blog
Google DeepMind News
Google DeepMind News
N
Netflix TechBlog - Medium
Y
Y Combinator Blog
腾讯CDC
Vercel News
Vercel News
雷峰网
雷峰网
GbyAI
GbyAI
aimingoo的专栏
aimingoo的专栏
阮一峰的网络日志
阮一峰的网络日志
博客园 - 【当耐特】

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(release): guard plugin release cli values · openclaw/...
vincentkoc · 2026-06-20 · via Recent Commits to openclaw:main
Original file line numberDiff line numberDiff line change

@@ -186,23 +186,23 @@ export function parsePluginReleaseArgs(argv: string[]): ParsedPluginReleaseArgs

186186

continue;

187187

}

188188

if (arg === "--plugins") {

189-

selection = parsePluginReleaseSelection(argv[index + 1]);

189+

selection = parsePluginReleaseSelection(readRequiredArgValue(argv, index, arg, true));

190190

pluginsFlagProvided = true;

191191

index += 1;

192192

continue;

193193

}

194194

if (arg === "--selection-mode") {

195-

selectionMode = parsePluginReleaseSelectionMode(argv[index + 1]);

195+

selectionMode = parsePluginReleaseSelectionMode(readRequiredArgValue(argv, index, arg));

196196

index += 1;

197197

continue;

198198

}

199199

if (arg === "--base-ref") {

200-

baseRef = argv[index + 1];

200+

baseRef = readRequiredArgValue(argv, index, arg);

201201

index += 1;

202202

continue;

203203

}

204204

if (arg === "--head-ref") {

205-

headRef = argv[index + 1];

205+

headRef = readRequiredArgValue(argv, index, arg);

206206

index += 1;

207207

continue;

208208

}

@@ -231,6 +231,21 @@ export function parsePluginReleaseArgs(argv: string[]): ParsedPluginReleaseArgs

231231

return { selection, selectionMode, pluginsFlagProvided, baseRef, headRef };

232232

}

233233
234+

function readRequiredArgValue(

235+

argv: string[],

236+

index: number,

237+

flag: string,

238+

allowBlank = false,

239+

): string {

240+

const value = argv[index + 1];

241+

const missingValue =

242+

value === undefined || value.startsWith("--") || (!allowBlank && value.trim() === "");

243+

if (missingValue) {

244+

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

245+

}

246+

return value;

247+

}

248+
234249

export function collectPublishablePluginPackageErrors(

235250

candidate: PublishablePluginPackageCandidate,

236251

): string[] {

Original file line numberDiff line numberDiff line change

@@ -59,6 +59,26 @@ describe("parsePluginReleaseArgs", () => {

5959

);

6060

});

6161
62+

it("rejects flags where option values are required", () => {

63+

for (const { args, message } of [

64+

{ args: ["--plugins", "--base-ref"], message: "--plugins requires a value." },

65+

{

66+

args: ["--selection-mode", "--plugins"],

67+

message: "--selection-mode requires a value.",

68+

},

69+

{

70+

args: ["--base-ref", "--head-ref", "main"],

71+

message: "--base-ref requires a value.",

72+

},

73+

{

74+

args: ["--head-ref", "--base-ref", "main"],

75+

message: "--head-ref requires a value.",

76+

},

77+

]) {

78+

expect(() => parsePluginReleaseArgs(args)).toThrowError(message);

79+

}

80+

});

81+
6282

it("requires plugin names for selected explicit publish mode", () => {

6383

expect(() => parsePluginReleaseArgs(["--selection-mode", "selected"])).toThrowError(

6484

"`--selection-mode selected` requires `--plugins`.",