feat: Add DISABLE_AUTO_UPDATES env variable for disabling updates in the application entirely (#1446)

This commit is contained in:
BatteredBunny
2025-12-28 10:50:55 +02:00
committed by GitHub
parent e821397e6c
commit 63015195b0
4 changed files with 16 additions and 5 deletions
+2 -1
View File
@@ -30,6 +30,7 @@ import MenuBuilder from './menu';
import {
autoUpdaterLogInterface,
createLog,
disableAutoUpdates,
hotkeyToElectronAccelerator,
isLinux,
isMacOS,
@@ -456,7 +457,7 @@ async function createWindow(first = true): Promise<void> {
return { action: 'deny' };
});
if (store.get('disable_auto_updates') !== true) {
if (!disableAutoUpdates() && store.get('disable_auto_updates') !== true) {
new AppUpdater();
}
+4
View File
@@ -18,6 +18,10 @@ if (process.env.NODE_ENV === 'development') {
};
}
export const disableAutoUpdates = () => {
return process.env['DISABLE_AUTO_UPDATES'];
};
export const isMacOS = () => {
return process.platform === 'darwin';
};