fix(electron): hide Windows background consoles (#16842)

Co-authored-by: Brendan Allan <git@brendonovich.dev>
This commit is contained in:
Luke Parker 2026-03-11 13:33:06 +10:00 committed by GitHub
commit 4ab35d2c5c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 16 additions and 4 deletions

View file

@ -15,7 +15,10 @@ export namespace Shell {
if (process.platform === "win32") {
await new Promise<void>((resolve) => {
const killer = spawn("taskkill", ["/pid", String(pid), "/f", "/t"], { stdio: "ignore" })
const killer = spawn("taskkill", ["/pid", String(pid), "/f", "/t"], {
stdio: "ignore",
windowsHide: true,
})
killer.once("exit", () => resolve())
killer.once("error", () => resolve())
})