prevent autoupdater from setting release channel (#1396)

This commit is contained in:
jeffvli
2025-12-15 18:12:16 -08:00
parent 154f0180e1
commit 614761efd7
2 changed files with 12 additions and 12 deletions
+3 -12
View File
@@ -46,24 +46,15 @@ export default class AppUpdater {
const isBetaVersion = packageJson.version.includes('-beta');
const releaseChannel = store.get('release_channel');
const isNotConfigured = !releaseChannel;
console.log('Release channel: ', releaseChannel);
console.log('Is beta version: ', isBetaVersion);
if (isNotConfigured) {
console.log(
'Release channel not configured, setting to ',
isBetaVersion ? 'beta' : 'latest',
);
store.set('release_channel', isBetaVersion ? 'beta' : 'latest');
}
console.log('[AppUpdater] Release channel from store: ', releaseChannel);
console.log('[AppUpdater] Is beta version: ', isBetaVersion);
if (releaseChannel === 'beta') {
autoUpdater.channel = 'beta';
autoUpdater.allowPrerelease = true;
autoUpdater.disableDifferentialDownload = true;
} else if (releaseChannel === 'latest') {
} else {
autoUpdater.channel = 'latest';
autoUpdater.allowDowngrade = true;
autoUpdater.allowPrerelease = false;