fix: reduce Windows console popups in web backend

Prefer graceful process termination before taskkill fallback
Force ConPTY for Windows terminal sessions to avoid console flashes
Keep git and server process operations running without visible command windows
This commit is contained in:
Bohdan Triapitsyn
2026-04-14 23:41:53 +03:00
parent 6d21cdc69e
commit fbb9330b1c
3 changed files with 26 additions and 2 deletions
+9
View File
@@ -1821,6 +1821,15 @@ async function terminateProcessTree(pid, options = {}) {
: 3000;
if (process.platform === 'win32') {
try {
process.kill(pid);
} catch {
}
if (await waitForProcessExit(pid, 800)) {
return true;
}
try {
spawnSync('taskkill', ['/pid', String(pid), '/t'], {
stdio: 'ignore',