diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2021-09-06 11:27:25 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2021-09-06 11:27:25 +0200 |
| commit | 9e9c273b43021d409b88d468a8b2bbb81efe47fd (patch) | |
| tree | a8142031415aecf10297767629c5e3f5387d2a8d /gui/src | |
| parent | 55746a5d6a36d6fed7b84ff3c98778c62b5ee798 (diff) | |
| parent | 593434ec9f0823f8fd5b4f885aad72f61d0bd71e (diff) | |
| download | mullvadvpn-9e9c273b43021d409b88d468a8b2bbb81efe47fd.tar.xz mullvadvpn-9e9c273b43021d409b88d468a8b2bbb81efe47fd.zip | |
Merge branch 'disable-version-check'
Diffstat (limited to 'gui/src')
| -rw-r--r-- | gui/src/main/index.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts index 94702ce979..8845422e6b 100644 --- a/gui/src/main/index.ts +++ b/gui/src/main/index.ts @@ -88,6 +88,8 @@ const GUI_VERSION = app.getVersion().replace('.0', ''); /// Mirrors the beta check regex in the daemon. Matches only well formed beta versions const IS_BETA = /^(\d{4})\.(\d+)-beta(\d+)$/; +const UPDATE_NOTIFICATION_DISABLED = process.env.MULLVAD_DISABLE_UPDATE_NOTIFICATION === '1'; + const SANDBOX_DISABLED = app.commandLine.hasSwitch('no-sandbox'); enum AppQuitStage { @@ -588,7 +590,9 @@ class ApplicationMain { } // fetch the latest version info in background - void this.fetchLatestVersion(); + if (!UPDATE_NOTIFICATION_DISABLED) { + void this.fetchLatestVersion(); + } // reset the reconnect backoff when connection established. this.reconnectBackoff.reset(); @@ -929,6 +933,10 @@ class ApplicationMain { } private setLatestVersion(latestVersionInfo: IAppVersionInfo) { + if (UPDATE_NOTIFICATION_DISABLED) { + return; + } + const suggestedIsBeta = latestVersionInfo.suggestedUpgrade !== undefined && IS_BETA.test(latestVersionInfo.suggestedUpgrade); |
