Skip to content

Commit 9cfb6ff

Browse files
committed
ignore: revert
1 parent 6ed661c commit 9cfb6ff

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/opencode/src/auth/copilot.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { lazy } from "../util/lazy"
33
import path from "path"
44

55
export const AuthCopilot = lazy(async () => {
6-
const file = Bun.file(path.join(Global.Path.cache, "copilot.ts"))
6+
const file = Bun.file(path.join(Global.Path.state, "plugin", "copilot.ts"))
77
const response = fetch(
88
"https://raw.githubusercontent.com/sst/opencode-github-copilot/refs/heads/main/auth.ts",
99
)

packages/opencode/src/bun/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export namespace BunProc {
1515
cmd: [which(), ...cmd],
1616
...options,
1717
})
18-
const result = Bun.spawnSync([which(), ...cmd], {
18+
const result = Bun.spawn([which(), ...cmd], {
1919
...options,
2020
stdout: "pipe",
2121
stderr: "pipe",
@@ -25,9 +25,9 @@ export namespace BunProc {
2525
BUN_BE_BUN: "1",
2626
},
2727
})
28-
const stdout = result.stdout!.toString()
29-
const stderr = result.stderr!.toString()
30-
const code = result.exitCode
28+
const code = await result.exited
29+
const stdout = await result.stdout.text()
30+
const stderr = await result.stderr.text()
3131
log.info("done", {
3232
code,
3333
stdout,

0 commit comments

Comments
 (0)