fix(ci): stabilize runners

This commit is contained in:
Peter Steinberger
2025-12-13 20:04:33 +00:00
parent 6143338116
commit 5a1687484c
2 changed files with 14 additions and 1 deletions

View File

@@ -3,6 +3,10 @@ import { spawn } from "node:child_process";
const DEFAULT_LAUNCHD_LABEL = "com.steipete.clawdis";
export function triggerClawdisRestart(): void {
if (process.platform !== "darwin") {
return;
}
const label = process.env.CLAWDIS_LAUNCHD_LABEL || DEFAULT_LAUNCHD_LABEL;
const uid =
typeof process.getuid === "function" ? process.getuid() : undefined;
@@ -11,5 +15,8 @@ export function triggerClawdisRestart(): void {
detached: true,
stdio: "ignore",
});
child.on("error", () => {
// Best-effort restart; ignore failures (e.g. missing launchctl, invalid label).
});
child.unref();
}