shell tweaks, better handling for windows (#5455)

Co-authored-by: GitHub Action <action@github.com>
This commit is contained in:
Aiden Cline
2025-12-12 14:11:07 -08:00
committed by GitHub
parent 91ab966921
commit 15caecdb45
6 changed files with 116 additions and 80 deletions

View File

@@ -6,10 +6,10 @@ import { Identifier } from "../id/id"
import { Log } from "../util/log"
import type { WSContext } from "hono/ws"
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"
import { Shell } from "@/shell/shell"
export namespace Pty {
const log = Log.create({ service: "pty" })
@@ -112,7 +112,7 @@ export namespace Pty {
export async function create(input: CreateInput) {
const id = Identifier.create("pty", false)
const command = input.command || shell()
const command = input.command || Shell.preferred()
const args = input.args || []
const cwd = input.cwd || Instance.directory
const env = { ...process.env, ...input.env } as Record<string, string>