summaryrefslogtreecommitdiffhomepage
path: root/gui/src/main
diff options
context:
space:
mode:
authorCory Forsstrom <cforsstrom18@gmail.com>2021-09-01 08:28:02 -0700
committerOskar Nyberg <3668602+raksooo@users.noreply.github.com>2021-09-06 11:22:14 +0200
commit5e6cb6d8943b196bc23dc892da9ef7db88360f58 (patch)
treed1686d5393c327f7a9c4606b69a45a8a9569bce9 /gui/src/main
parent55746a5d6a36d6fed7b84ff3c98778c62b5ee798 (diff)
downloadmullvadvpn-5e6cb6d8943b196bc23dc892da9ef7db88360f58.tar.xz
mullvadvpn-5e6cb6d8943b196bc23dc892da9ef7db88360f58.zip
Add env var to disable version check in gui
Diffstat (limited to 'gui/src/main')
-rw-r--r--gui/src/main/index.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index 94702ce979..db26120562 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 VERSION_CHECK_DISABLED = process.env.DISABLE_VERSION_CHECK === '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 (!VERSION_CHECK_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 (VERSION_CHECK_DISABLED) {
+ return;
+ }
+
const suggestedIsBeta =
latestVersionInfo.suggestedUpgrade !== undefined &&
IS_BETA.test(latestVersionInfo.suggestedUpgrade);