mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-17 13:00:48 +00:00
fix(windows): add windowsHide to detached spawn calls to suppress console windows (#44693)
The restart helper and taskkill spawn calls were missing windowsHide: true, causing visible command prompt windows to flash on screen during gateway restart and process cleanup on Windows.
This commit is contained in:
committed by
Peter Steinberger
parent
9044a10c5f
commit
9da06d918f
@@ -287,6 +287,7 @@ describe("restart-helper", () => {
|
||||
expect(spawn).toHaveBeenCalledWith("/bin/sh", [scriptPath], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
expect(mockChild.unref).toHaveBeenCalled();
|
||||
});
|
||||
@@ -302,6 +303,7 @@ describe("restart-helper", () => {
|
||||
expect(spawn).toHaveBeenCalledWith("cmd.exe", ["/d", "/s", "/c", scriptPath], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
expect(mockChild.unref).toHaveBeenCalled();
|
||||
});
|
||||
@@ -317,6 +319,7 @@ describe("restart-helper", () => {
|
||||
expect(spawn).toHaveBeenCalledWith("cmd.exe", ["/d", "/s", "/c", `"${scriptPath}"`], {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -169,6 +169,7 @@ export async function runRestartScript(scriptPath: string): Promise<void> {
|
||||
const child = spawn(file, args, {
|
||||
detached: true,
|
||||
stdio: "ignore",
|
||||
windowsHide: true,
|
||||
});
|
||||
child.unref();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user