summaryrefslogtreecommitdiffhomepage
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-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
}