fix(windows): restore /editor support on Windows (#17146)

This commit is contained in:
AbigailJixiangyuyu
2026-03-17 06:11:02 +08:00
committed by GitHub
parent 68809365df
commit e9a17e4480
2 changed files with 19 additions and 12 deletions

View File

@@ -3,6 +3,7 @@ import { buffer } from "node:stream/consumers"
export namespace Process {
export type Stdio = "inherit" | "pipe" | "ignore"
export type Shell = boolean | string
export interface Options {
cwd?: string
@@ -10,6 +11,7 @@ export namespace Process {
stdin?: Stdio
stdout?: Stdio
stderr?: Stdio
shell?: Shell
abort?: AbortSignal
kill?: NodeJS.Signals | number
timeout?: number
@@ -60,6 +62,7 @@ export namespace Process {
cwd: opts.cwd,
env: opts.env === null ? {} : opts.env ? { ...process.env, ...opts.env } : undefined,
stdio: [opts.stdin ?? "ignore", opts.stdout ?? "ignore", opts.stderr ?? "ignore"],
shell: opts.shell,
windowsHide: process.platform === "win32",
})