diff --git a/script/check-opencode-annotations.ts b/script/check-opencode-annotations.ts index 314b399d46..48370c990f 100644 --- a/script/check-opencode-annotations.ts +++ b/script/check-opencode-annotations.ts @@ -35,6 +35,11 @@ const base = baseIdx !== -1 ? args[baseIdx + 1] : "origin/main" function run(cmd: string, args: string[]) { const result = spawnSync(cmd, args, { cwd: ROOT, encoding: "utf8" }) + if (result.status !== 0) { + const msg = result.stderr?.trim() || result.stdout?.trim() || "unknown error" + console.error(`Command failed: ${cmd} ${args.join(" ")}\n${msg}`) + process.exit(1) + } return result.stdout?.trim() ?? "" }