mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-24 21:29:38 +00:00
fix(windows): resolve taskkill in core spawns
This commit is contained in:
@@ -100,6 +100,7 @@ import {
|
||||
type PreUpdateConfigRestoreInput,
|
||||
} from "../../infra/update-post-core-context.js";
|
||||
import { runGatewayUpdate, type UpdateRunResult } from "../../infra/update-runner.js";
|
||||
import { getWindowsSystem32ExePath } from "../../infra/windows-install-roots.js";
|
||||
import { normalizePluginsConfig, resolveEffectiveEnableState } from "../../plugins/config-state.js";
|
||||
import {
|
||||
loadInstalledPluginIndexInstallRecords,
|
||||
@@ -2877,10 +2878,14 @@ async function readPostCorePluginUpdateResultFile(
|
||||
function stopPostCoreUpdateChild(child: ChildProcess): void {
|
||||
if (process.platform === "win32" && child.pid) {
|
||||
try {
|
||||
const killer = spawn("taskkill", ["/PID", String(child.pid), "/T", "/F"], {
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
const killer = spawn(
|
||||
getWindowsSystem32ExePath("taskkill.exe"),
|
||||
["/PID", String(child.pid), "/T", "/F"],
|
||||
{
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
},
|
||||
);
|
||||
killer.once("error", () => {
|
||||
child.kill();
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user