GeezerVison is showing github.com — ci · simonklee/opencode@e4d3b96
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: script/beta.ts +9-4Lines changed: 9 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -106,12 +106,17 @@ async function main() { |
106 | 106 | } |
107 | 107 |
|
108 | 108 | const commitMsg = `Apply PR #${pr.number}: ${pr.title}` |
109 | | - const commit = await $`git commit -m ${commitMsg}`.nothrow() |
110 | | - if (commit.exitCode !== 0) { |
111 | | - console.log(` Failed to commit: ${commit.stderr}`) |
| 109 | + const commit = await Bun.spawn(["git", "commit", "-m", commitMsg], { |
| 110 | + stdout: "pipe", |
| 111 | + stderr: "pipe", |
| 112 | + }) |
| 113 | + const commitExit = await commit.exited |
| 114 | + const commitStderr = await Bun.readableStreamToText(commit.stderr) |
| 115 | + if (commitExit !== 0) { |
| 116 | + console.log(` Failed to commit: ${commitStderr}`) |
112 | 117 | await $`git checkout -- .`.nothrow() |
113 | 118 | await $`git clean -fd`.nothrow() |
114 | | - skipped.push({ number: pr.number, reason: `Commit failed: ${commit.stderr}` }) |
| 119 | + skipped.push({ number: pr.number, reason: `Commit failed: ${commitStderr}` }) |
115 | 120 | continue |
116 | 121 | } |
117 | 122 |
|
|