fix: support windows auto update (#3911)

This commit is contained in:
Peng Xiao
2023-08-23 22:14:37 +08:00
committed by Alex Yang
parent 3ddc76a703
commit d89be5804f
3 changed files with 14 additions and 16 deletions
@@ -2,7 +2,7 @@ import { app } from 'electron';
import { autoUpdater } from 'electron-updater';
import { z } from 'zod';
import { isMacOS } from '../../shared/utils';
import { isMacOS, isWindows } from '../../shared/utils';
import { logger } from '../logger';
import { updaterSubjects } from './event';
@@ -40,8 +40,8 @@ export const registerUpdater = async () => {
return;
}
// TODO: support auto update on windows and linux
const allowAutoUpdate = isMacOS();
// TODO: support auto update on linux
const allowAutoUpdate = isMacOS() || isWindows();
autoUpdater.logger = logger;
autoUpdater.autoDownload = false;