修复:生成绑定校验不再因首个目标失败就中止

- 原来每个目标里直接 process.exit,第一个目标(shared-contracts)失败时 AGC 目标根本不会被检查,得反复重跑才知道还有哪些绑定陈旧
- 改为记录 failed 后 continue,跑完全部目标再统一退出 1,两个绑定集的错误一次报齐
This commit is contained in:
2026-10-02 22:31:02 +08:00
parent fff4e8ff68
commit 80afa2a139
+4 -2
View File
@@ -117,12 +117,13 @@ for (const target of targets) {
);
const result = run('cargo', target.cargoArgs);
if (result.status !== 0) {
failed = true;
console.error(
`生成绑定校验无法运行:${target.label} 的 export_bindings 未通过`,
);
if (result.stdout) console.error(result.stdout.trim());
if (result.stderr) console.error(result.stderr.trim());
process.exit(result.status ?? 1);
continue;
}
if (target.formatDirs.length > 0) {
const formatted = run(npxCommand, [
@@ -131,12 +132,13 @@ for (const target of targets) {
...target.formatDirs,
]);
if (formatted.status !== 0) {
failed = true;
console.error(
`生成绑定校验无法运行:${target.label} 的 prettier 格式化失败`,
);
if (formatted.stdout) console.error(formatted.stdout.trim());
if (formatted.stderr) console.error(formatted.stderr.trim());
process.exit(formatted.status ?? 1);
continue;
}
}
const after = new Map(