Prevent auto download of upgrade
This commit is contained in:
@@ -79,10 +79,7 @@ function downloadAndInstall() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initialize(appState, mainWindow, notifyOnly = false) {
|
function initialize(appState, mainWindow, notifyOnly = false) {
|
||||||
autoUpdater.notifyOnly = notifyOnly;
|
autoUpdater.autoDownload = false; // To prevent upgrading on quit
|
||||||
if (notifyOnly) {
|
|
||||||
autoUpdater.autoDownload = false;
|
|
||||||
}
|
|
||||||
const assetsDir = path.resolve(app.getAppPath(), 'assets');
|
const assetsDir = path.resolve(app.getAppPath(), 'assets');
|
||||||
autoUpdater.on('error', (err) => {
|
autoUpdater.on('error', (err) => {
|
||||||
console.error('Error in autoUpdater:', err.message);
|
console.error('Error in autoUpdater:', err.message);
|
||||||
@@ -90,7 +87,7 @@ function initialize(appState, mainWindow, notifyOnly = false) {
|
|||||||
if (isUpdateApplicable(new Date(), appState.skippedVersion, info)) {
|
if (isUpdateApplicable(new Date(), appState.skippedVersion, info)) {
|
||||||
updaterModal = createUpdaterModal(mainWindow, {
|
updaterModal = createUpdaterModal(mainWindow, {
|
||||||
linuxAppIcon: path.join(assetsDir, 'appicon.png'),
|
linuxAppIcon: path.join(assetsDir, 'appicon.png'),
|
||||||
notifyOnly: autoUpdater.notifyOnly
|
notifyOnly
|
||||||
});
|
});
|
||||||
updaterModal.on('closed', () => {
|
updaterModal.on('closed', () => {
|
||||||
updaterModal = null;
|
updaterModal = null;
|
||||||
|
Reference in New Issue
Block a user