Skip to content

Commit 4316eda

Browse files
committed
fix first run github copilot
1 parent d845924 commit 4316eda

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/opencode/src/auth/copilot.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@ import path from "path"
44

55
export const AuthCopilot = lazy(async () => {
66
const file = Bun.file(path.join(Global.Path.state, "plugin", "copilot.ts"))
7+
const exists = await file.exists()
78
const response = fetch("https://raw.githubusercontent.com/sst/opencode-github-copilot/refs/heads/main/auth.ts")
89
.then((x) => Bun.write(file, x))
910
.catch(() => {})
1011

11-
if (!file.exists()) {
12+
if (!exists) {
1213
const worked = await response
1314
if (!worked) return
1415
}

0 commit comments

Comments
 (0)