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

Function supervisedServiceStatus

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

Source from the content-addressed store, hash-verified

105 new RegExp(`^${key}:\\s+yes(?:\\s|$)`, "im").test(stdout);
106
107export const supervisedServiceStatus = async (): Promise<SupervisedServiceStatus> => {
108 if (!executorAvailable()) return { supported: false, registered: false, running: false };
109 const dataDir = join(app.getPath("home"), ".executor");
110 const result = await runExecutor(["service", "status"], {
111 dataDir,
112 captureUserPath: false,
113 });
114 if (result.code !== 0) {
115 serviceLog.warn(`service status failed: ${result.stderr || result.stdout}`);
116 return { supported: true, registered: false, running: false };
117 }
118 const supported = !/^Platform:\s+unsupported$/im.test(result.stdout);
119 return {
120 supported,
121 registered: supported && statusValue(result.stdout, "Registered"),
122 running: supported && statusValue(result.stdout, "Running"),
123 };
124};
125
126export const installSupervisedService = async (opts: InstallOptions): Promise<void> => {
127 if (!executorAvailable()) {

Callers 2

registerIpcHandlersFunction · 0.90

Calls 4

executorAvailableFunction · 0.85
runExecutorFunction · 0.85
statusValueFunction · 0.85
warnMethod · 0.80

Tested by

no test coverage detected