mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
sync
This commit is contained in:
parent
8ff65c9ac1
commit
be3fbf6b11
2 changed files with 3 additions and 4 deletions
|
|
@ -41,11 +41,11 @@ If the check passed, do not create any file.
|
|||
`)
|
||||
|
||||
// parse for reason
|
||||
let reason
|
||||
let content
|
||||
try {
|
||||
reason = await Bun.file(filename).text()
|
||||
content = await Bun.file(filename).json()
|
||||
} catch (e) {}
|
||||
if (reason) throw new Error(reason)
|
||||
if (content) throw new Error(content.reason ?? "unknown reason")
|
||||
} finally {
|
||||
Opencode.closeServer()
|
||||
await Auth.revoke()
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import { spawn } from "node:child_process"
|
||||
import { lazy } from "./lazy"
|
||||
import { createOpencodeClient } from "@opencode-ai/sdk"
|
||||
import { Git } from "./git"
|
||||
import { Auth } from "./auth"
|
||||
|
||||
export namespace Opencode {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue