diff options
| author | Dax Raad <[email protected]> | 2025-06-24 14:59:27 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-24 14:59:27 -0400 |
| commit | 9cfb6ff9646553d6dcbcbe22844ffbeb6480dc12 (patch) | |
| tree | e25028df37ef2955f6d07e7ed5bbe1e0a6b68416 | |
| parent | 6ed661c140242289c666dcfe1a484d78c71c1612 (diff) | |
| download | opencode-9cfb6ff9646553d6dcbcbe22844ffbeb6480dc12.tar.gz opencode-9cfb6ff9646553d6dcbcbe22844ffbeb6480dc12.zip | |
ignore: revert
| -rw-r--r-- | packages/opencode/src/auth/copilot.ts | 2 | ||||
| -rw-r--r-- | packages/opencode/src/bun/index.ts | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/packages/opencode/src/auth/copilot.ts b/packages/opencode/src/auth/copilot.ts index 4defdedf1..4bbbaf2cd 100644 --- a/packages/opencode/src/auth/copilot.ts +++ b/packages/opencode/src/auth/copilot.ts @@ -3,7 +3,7 @@ import { lazy } from "../util/lazy" import path from "path" export const AuthCopilot = lazy(async () => { - const file = Bun.file(path.join(Global.Path.cache, "copilot.ts")) + const file = Bun.file(path.join(Global.Path.state, "plugin", "copilot.ts")) const response = fetch( "https://raw.githubusercontent.com/sst/opencode-github-copilot/refs/heads/main/auth.ts", ) diff --git a/packages/opencode/src/bun/index.ts b/packages/opencode/src/bun/index.ts index 927c23bf6..2393565ef 100644 --- a/packages/opencode/src/bun/index.ts +++ b/packages/opencode/src/bun/index.ts @@ -15,7 +15,7 @@ export namespace BunProc { cmd: [which(), ...cmd], ...options, }) - const result = Bun.spawnSync([which(), ...cmd], { + const result = Bun.spawn([which(), ...cmd], { ...options, stdout: "pipe", stderr: "pipe", @@ -25,9 +25,9 @@ export namespace BunProc { BUN_BE_BUN: "1", }, }) - const stdout = result.stdout!.toString() - const stderr = result.stderr!.toString() - const code = result.exitCode + const code = await result.exited + const stdout = await result.stdout.text() + const stderr = await result.stderr.text() log.info("done", { code, stdout, |
