do not use required pty for local dev
This commit is contained in:
@@ -8,11 +8,13 @@ import { Instance } from "../project/instance"
|
||||
import { shell } from "@opencode-ai/util/shell"
|
||||
import { lazy } from "@opencode-ai/util/lazy"
|
||||
import {} from "process"
|
||||
import { Installation } from "@/installation"
|
||||
|
||||
export namespace Pty {
|
||||
const log = Log.create({ service: "pty" })
|
||||
|
||||
const pty = lazy(async () => {
|
||||
if (!Installation.isLocal()) {
|
||||
const path = require(
|
||||
`bun-pty/rust-pty/target/release/${
|
||||
process.platform === "win32"
|
||||
@@ -29,6 +31,7 @@ export namespace Pty {
|
||||
}`,
|
||||
)
|
||||
process.env.BUN_PTY_LIB = path
|
||||
}
|
||||
const { spawn } = await import("bun-pty")
|
||||
return spawn
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user