summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-07-19 19:19:38 -0400
committerDax Raad <[email protected]>2025-07-19 19:19:38 -0400
commit4316edaf43c3d12c08d3cdb4b8daa497e2975204 (patch)
tree567ab200013128e2d1b9803db4eb31372242df1b
parentd845924e8bc61e511c60f99cd4dd2f07889fccba (diff)
downloadopencode-4316edaf43c3d12c08d3cdb4b8daa497e2975204.tar.gz
opencode-4316edaf43c3d12c08d3cdb4b8daa497e2975204.zip
fix first run github copilot
-rw-r--r--packages/opencode/src/auth/copilot.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/opencode/src/auth/copilot.ts b/packages/opencode/src/auth/copilot.ts
index 042f7c35d..7a9b70f09 100644
--- a/packages/opencode/src/auth/copilot.ts
+++ b/packages/opencode/src/auth/copilot.ts
@@ -4,11 +4,12 @@ import path from "path"
export const AuthCopilot = lazy(async () => {
const file = Bun.file(path.join(Global.Path.state, "plugin", "copilot.ts"))
+ const exists = await file.exists()
const response = fetch("https://raw.githubusercontent.com/sst/opencode-github-copilot/refs/heads/main/auth.ts")
.then((x) => Bun.write(file, x))
.catch(() => {})
- if (!file.exists()) {
+ if (!exists) {
const worked = await response
if (!worked) return
}