Catch errors in node main (#4627)

This commit is contained in:
Jack Amadeo
2025-09-12 15:49:37 -04:00
committed by GitHub
parent bc15e06c6a
commit 178573ce95
+10 -1
View File
@@ -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
await ensureWinShims();
@@ -2144,6 +2144,15 @@ app.whenReady().then(async () => {
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[]> {