MCPcopy Index your code
hub / github.com/coder/mux / restartApp

Method restartApp

src/node/services/windowService.ts:26–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24 }
25
26 async restartApp(): Promise<{ supported: true } | { supported: false; message: string }> {
27 const restartAppHandler = this.restartAppHandler;
28 if (!restartAppHandler) {
29 const message = "Restart is only available in the desktop app.";
30 log.warn("WindowService: restartApp requested without a registered restart handler");
31 return { supported: false, message };
32 }
33
34 try {
35 await restartAppHandler();
36 return { supported: true };
37 } catch (error) {
38 log.error("WindowService: restartApp failed", error);
39 throw error;
40 }
41 }
42
43 focusMainWindow(): void {
44 const mainWindow = this.mainWindow;

Callers 3

routerFunction · 0.80
server.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected