do not use required pty for local dev

This commit is contained in:
Dax Raad
2025-12-05 10:39:44 -05:00
parent 53ed1c912b
commit 60388f7f03

View File

@@ -8,11 +8,13 @@ import { Instance } from "../project/instance"
import { shell } from "@opencode-ai/util/shell" import { shell } from "@opencode-ai/util/shell"
import { lazy } from "@opencode-ai/util/lazy" import { lazy } from "@opencode-ai/util/lazy"
import {} from "process" import {} from "process"
import { Installation } from "@/installation"
export namespace Pty { export namespace Pty {
const log = Log.create({ service: "pty" }) const log = Log.create({ service: "pty" })
const pty = lazy(async () => { const pty = lazy(async () => {
if (!Installation.isLocal()) {
const path = require( const path = require(
`bun-pty/rust-pty/target/release/${ `bun-pty/rust-pty/target/release/${
process.platform === "win32" process.platform === "win32"
@@ -29,6 +31,7 @@ export namespace Pty {
}`, }`,
) )
process.env.BUN_PTY_LIB = path process.env.BUN_PTY_LIB = path
}
const { spawn } = await import("bun-pty") const { spawn } = await import("bun-pty")
return spawn return spawn
}) })