summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorOskar Nyberg <oskar@mullvad.net>2021-09-06 11:27:25 +0200
committerOskar Nyberg <oskar@mullvad.net>2021-09-06 11:27:25 +0200
commit9e9c273b43021d409b88d468a8b2bbb81efe47fd (patch)
treea8142031415aecf10297767629c5e3f5387d2a8d
parent55746a5d6a36d6fed7b84ff3c98778c62b5ee798 (diff)
parent593434ec9f0823f8fd5b4f885aad72f61d0bd71e (diff)
downloadmullvadvpn-9e9c273b43021d409b88d468a8b2bbb81efe47fd.tar.xz
mullvadvpn-9e9c273b43021d409b88d468a8b2bbb81efe47fd.zip
Merge branch 'disable-version-check'
-rw-r--r--CHANGELOG.md2
-rw-r--r--README.md2
-rw-r--r--gui/src/main/index.ts10
3 files changed, 13 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6bf8a3923..68bee316f2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -27,6 +27,8 @@ Line wrap the file at 100 chars. Th
### Added
- Added possibility to filter locations by provider in the desktop app.
- Add WireGuard over TCP CLI option for all relays.
+- Add GUI environment variable `MULLVAD_DISABLE_UPDATE_NOTIFICATION`. If set to `1`, GUI
+ notification will be disabled when an update is available.
#### Android
- Added toggle for Split tunneling view to be able to show system apps
diff --git a/README.md b/README.md
index 91bac93396..c562d4cd4a 100644
--- a/README.md
+++ b/README.md
@@ -509,6 +509,8 @@ to do that before starting the GUI.
1. `MULLVAD_PATH` - Allows changing the path to the folder with the `mullvad-problem-report` tool
when running in development mode. Defaults to: `<repo>/target/debug/`.
+2. `MULLVAD_DISABLE_UPDATE_NOTIFICATION` - If set to `1`, GUI notification will be disabled when
+ an update is available.
## Making a release
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);