MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / restartSupervisedService

Function restartSupervisedService

apps/desktop/src/main/service.ts:132–143  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130};
131
132export const restartSupervisedService = async (): Promise<void> => {
133 if (!executorAvailable()) {
134 throw new Error("Bundled executor binary is not available.");
135 }
136 const dataDir = join(app.getPath("home"), ".executor");
137 const result = await runExecutor(["service", "restart"], { dataDir });
138 if (result.code !== 0) {
139 throw new Error(
140 (result.stderr || result.stdout).trim() || "`executor service restart` failed.",
141 );
142 }
143};

Callers 2

registerIpcHandlersFunction · 0.90

Calls 2

executorAvailableFunction · 0.85
runExecutorFunction · 0.85

Tested by

no test coverage detected