mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 17:58:28 +00:00
fix(ci): make Windows unit tests deterministic
This commit is contained in:
@@ -99,9 +99,10 @@ async function execLaunchctl(
|
||||
args: string[],
|
||||
): Promise<{ stdout: string; stderr: string; code: number }> {
|
||||
try {
|
||||
const { stdout, stderr } = await execFileAsync("launchctl", args, {
|
||||
encoding: "utf8",
|
||||
});
|
||||
const isWindows = process.platform === "win32";
|
||||
const file = isWindows ? (process.env.ComSpec ?? "cmd.exe") : "launchctl";
|
||||
const fileArgs = isWindows ? ["/d", "/s", "/c", "launchctl", ...args] : args;
|
||||
const { stdout, stderr } = await execFileAsync(file, fileArgs, { encoding: "utf8" });
|
||||
return {
|
||||
stdout: String(stdout ?? ""),
|
||||
stderr: String(stderr ?? ""),
|
||||
|
||||
Reference in New Issue
Block a user