From ee538769f976123193992219f29a85b370cdc127 Mon Sep 17 00:00:00 2001 From: "Fetkovich, William" Date: Sun, 29 Mar 2026 03:23:51 -0400 Subject: [PATCH] fix(stage-tamagotchi): autoUpdater should have channel selected (#1506) --- .../src/main/services/electron/auto-updater.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts b/apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts index 5c1cd2e6b..182788c98 100644 --- a/apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts +++ b/apps/stage-tamagotchi/src/main/services/electron/auto-updater.ts @@ -4,6 +4,8 @@ import type { UpdateInfo } from 'electron-updater' import type { AutoUpdaterState } from '../../../shared/eventa' +import { arch } from 'node:process' + import electronUpdater from 'electron-updater' import { is } from '@electron-toolkit/utils' @@ -21,6 +23,7 @@ import { import { MockAutoUpdater } from './mock-auto-updater' export interface AppUpdaterLike { + channel?: string on: (event: string, listener: (...args: any[]) => void) => any checkForUpdates: () => Promise downloadUpdate: () => Promise @@ -59,6 +62,10 @@ export function setupAutoUpdater(): AutoUpdater { let state: AutoUpdaterState = { status: 'idle' } const hooks = new Set<(state: AutoUpdaterState) => void>() + // Fix: explicitly map base channel to architecture to resolve 404 targets. + // electron-updater natively appends OS suffixes (-mac.yml, -linux.yml) automatically. + autoUpdater.channel = arch === 'arm64' ? 'latest-arm64' : 'latest-x64' + function broadcast(next: AutoUpdaterState) { state = next