فینورا پرو - سامانه جامع حسابداری و صدور فاکتور
test(windows-vm): terminate native WebView2 process tree between installed version upgrades
davoodmehraban89 committed
Oct 16, 2026 at 18:11 UTC
cf34c2df6c0d7f986015ac8cd65ea77ffb76a393
1 file changed
+8
-1
tests/windows-vm-installed-tauri-cdp.cjs
+8
-1
@@ -204,7 +204,14 @@ async function connect(url) {
204
} finally {
205
if (reportPath) fs.writeFileSync(reportPath, JSON.stringify(report, null, 2) + '\n');
206
try { cdp?.close(); } catch {}
207
- try { proc?.kill(); } catch {}
207
+ // Ensure no WebView2 child process can hold the previous NSIS executable
208
+ // open during the subsequent in-place upgrade on this disposable runner.
209
+ if (proc?.pid) {
210
+ try {
211
+ execFileSync('taskkill.exe', ['/PID', String(proc.pid), '/T', '/F'],
212
+ { stdio: 'ignore', timeout: 10000 });
213
+ } catch (_) { try { proc.kill(); } catch (_) {} }
214
+ }
215
cleanDebugPolicies(debugPolicyKeys);
216
await wait(700);
217
}