From 9d62cc9437a16a31cf2a58eb3f6e5e4b0a0a3b94 Mon Sep 17 00:00:00 2001 From: Ryan Cao <70191398+ryanccn@users.noreply.github.com> Date: Thu, 27 Jul 2023 08:16:17 +0800 Subject: [PATCH] fix: macOS updater URL for different architectures (#69) Co-authored-by: V --- src/updater/main.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/updater/main.ts b/src/updater/main.ts index 760b772c..ea25cbd6 100644 --- a/src/updater/main.ts +++ b/src/updater/main.ts @@ -35,7 +35,11 @@ ipcMain.handle(IpcEvents.UPDATER_DOWNLOAD, () => { return portable ? !isSetup : isSetup; })!.browser_download_url; case "darwin": - return assets.find(a => a.name.endsWith(".dmg"))!.browser_download_url; + return assets.find(a => + process.arch === "arm64" + ? a.name.endsWith("-arm64-mac.zip") + : a.name.endsWith("-mac.zip") && !a.name.includes("arm64") + )!.browser_download_url; case "linux": return updateData.release.html_url; default: