Skip to content

Commit

Permalink
fix: macOS updater URL for different architectures (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: V <[email protected]>
  • Loading branch information
ryanccn and Vendicated authored Jul 27, 2023
1 parent 2b4f7a0 commit 9d62cc9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/updater/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 9d62cc9

Please sign in to comment.