File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { lazy } from "../util/lazy"
33import path from "path"
44
55export 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 )
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments