From 7d0583f47b5359037a7ef212a902a72fe4c48211 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 25 Aug 2018 08:30:06 -0400 Subject: [PATCH] ELECTRON_NO_UPDATER env variable to disable auto-updates --- src/electron/updater.main.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/electron/updater.main.ts b/src/electron/updater.main.ts index 012f169f49..5130159cf4 100644 --- a/src/electron/updater.main.ts +++ b/src/electron/updater.main.ts @@ -34,7 +34,8 @@ export class UpdaterMain { const linuxCanUpdate = process.platform === 'linux' && isAppImage(); const windowsCanUpdate = process.platform === 'win32' && !isWindowsStore() && !isWindowsPortable(); const macCanUpdate = process.platform === 'darwin' && !isMacAppStore(); - this.canUpdate = linuxCanUpdate || windowsCanUpdate || macCanUpdate; + this.canUpdate = process.env.ELECTRON_NO_UPDATER !== '1' && + (linuxCanUpdate || windowsCanUpdate || macCanUpdate); } async init() {