summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2025-12-29 17:46:10 -0600
committerAiden Cline <[email protected]>2025-12-29 17:46:29 -0600
commit1da3550c4dc451429dc8f43c1d0590f4c7507f76 (patch)
tree1e0817849149957a3eefee49118ad38e69a0c21b
parent0c48e6a116dc8541726ab0dad2effc5749cc9a6a (diff)
downloadopencode-1da3550c4dc451429dc8f43c1d0590f4c7507f76.tar.gz
opencode-1da3550c4dc451429dc8f43c1d0590f4c7507f76.zip
ci: improve err msg
-rwxr-xr-xscript/sync-zed.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/script/sync-zed.ts b/script/sync-zed.ts
index 4bbf84546..451c4da0a 100755
--- a/script/sync-zed.ts
+++ b/script/sync-zed.ts
@@ -106,11 +106,17 @@ async function main() {
await $`git push https://x-access-token:${token}@github.com/${FORK_REPO}.git ${branchName}`
console.log(`📬 Creating pull request...`)
- const prUrl =
+ const prResult =
await $`gh pr create --repo ${UPSTREAM_REPO} --base main --head ${FORK_REPO.split("/")[0]}:${branchName} --title "Update ${EXTENSION_NAME} to v${cleanVersion}" --body "Updating OpenCode extension to v${cleanVersion}"`
.env({ GH_TOKEN: token })
- .text()
+ .nothrow()
+ if (prResult.exitCode !== 0) {
+ console.error("stderr:", prResult.stderr.toString())
+ throw new Error(`Failed with exit code ${prResult.exitCode}`)
+ }
+
+ const prUrl = prResult.stdout.toString().trim()
console.log(`✅ Pull request created: ${prUrl}`)
console.log(`🎉 Done!`)
}