mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 05:01:03 +03:00
fix(windows): hide background subprocess windows (#52871)
Co-authored-by: Hona <10430890+Hona@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
Unverified
parent
f74512bfe0
commit
f72a103a4b
@@ -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 },
|
||||
})
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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 },
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user