Catch errors in node main (#4627)
This commit is contained in:
+10
-1
@@ -1675,7 +1675,7 @@ const registerGlobalHotkey = (accelerator: string) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
app.whenReady().then(async () => {
|
async function appMain() {
|
||||||
// Ensure Windows shims are available before any MCP processes are spawned
|
// Ensure Windows shims are available before any MCP processes are spawned
|
||||||
await ensureWinShims();
|
await ensureWinShims();
|
||||||
|
|
||||||
@@ -2144,6 +2144,15 @@ app.whenReady().then(async () => {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
app.whenReady().then(async () => {
|
||||||
|
try {
|
||||||
|
await appMain();
|
||||||
|
} catch (error) {
|
||||||
|
dialog.showErrorBox('Goose Error', `Failed to create main window: ${error}`);
|
||||||
|
app.quit();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
async function getAllowList(): Promise<string[]> {
|
async function getAllowList(): Promise<string[]> {
|
||||||
|
|||||||
Reference in New Issue
Block a user