From 38c3de6c921d4be057678c16fb0bf49ad37c7bec Mon Sep 17 00:00:00 2001 From: thororen1234 <78185467+thororen1234@users.noreply.github.com> Date: Sat, 18 Oct 2025 21:54:38 -0400 Subject: [PATCH] =?UTF-8?q?Fix=20Crashing=20=F0=9F=92=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/updater/http.ts | 1 + src/main/updater/index.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/main/updater/http.ts b/src/main/updater/http.ts index ded0e0314..13929daab 100644 --- a/src/main/updater/http.ts +++ b/src/main/updater/http.ts @@ -80,6 +80,7 @@ async function applyUpdates() { return true; } +ipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`)); ipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(calculateGitChanges)); ipcMain.handle(IpcEvents.UPDATE, serializeErrors(fetchUpdates)); ipcMain.handle(IpcEvents.BUILD, serializeErrors(applyUpdates)); diff --git a/src/main/updater/index.ts b/src/main/updater/index.ts index c3bdd8b6a..2fb7669dd 100644 --- a/src/main/updater/index.ts +++ b/src/main/updater/index.ts @@ -23,6 +23,9 @@ import gitRemote from "~git-remote"; import { serializeErrors } from "./common"; -ipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`)); - -if (!IS_UPDATER_DISABLED) require(IS_STANDALONE ? "./http" : "./git"); +if (!IS_UPDATER_DISABLED) { + require(IS_STANDALONE ? "./http" : "./git"); +} else { + ipcMain.handle(IpcEvents.GET_REPO, serializeErrors(() => `https://github.com/${gitRemote}`)); + ipcMain.handle(IpcEvents.GET_UPDATES, serializeErrors(() => [])); +}