fix(windows): hide background subprocess windows (#52871)

Co-authored-by: Hona <10430890+Hona@users.noreply.github.com>
This commit is contained in:
opencode-agent[bot]
2026-10-04 11:20:47 +10:00
committed by GitHub
Unverified
parent f74512bfe0
commit f72a103a4b
4 changed files with 4 additions and 3 deletions
+1
View File
@@ -17,6 +17,7 @@ export function spawnServiceContender(
): ServiceContender {
const child = spawn(command, args, {
detached: true,
windowsHide: true,
stdio: ["ignore", "ignore", "pipe"],
env: { ...process.env, ...env },
})
+1 -1
View File
@@ -233,7 +233,7 @@ export const makeDaemonTransport = Effect.fn("PersistentPty.makeDaemonTransport"
const child = spawn(
executable,
["daemon", "--runtime-dir", root, "--name", id],
{ detached: true, stdio: "ignore" },
{ detached: true, windowsHide: true, stdio: "ignore" },
)
child.once("spawn", () => {
child.unref()
+1 -1
View File
@@ -27,7 +27,7 @@ async function signWindows(configuration: { path: string }) {
await execFileAsync(
"pwsh",
["-NoLogo", "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", signScript, configuration.path],
{ cwd: rootDir },
{ cwd: rootDir, windowsHide: true },
)
}
+1 -1
View File
@@ -35,7 +35,7 @@ const checkMacosApp = Effect.fn("DesktopFiles.checkMacosApp")(function* (appName
const resolveWindowsAppPath = Effect.fn("DesktopFiles.resolveWindowsAppPath")(function* (appName: string) {
const fs = yield* FileSystem.FileSystem
const path = yield* Path.Path
const result = yield* Effect.tryPromise(() => execFilePromise("where", [appName])).pipe(
const result = yield* Effect.tryPromise(() => execFilePromise("where", [appName], { windowsHide: true })).pipe(
Effect.orElseSucceed(() => undefined),
)
if (!result) return null