summaryrefslogtreecommitdiffhomepage
path: root/gui/src
diff options
context:
space:
mode:
authorEmīls <emils@mullvad.net>2020-06-25 11:56:13 +0100
committerEmīls <emils@mullvad.net>2020-06-25 15:21:31 +0100
commitc147d3b36bcd1a4be37da0aaef9d49f5ce40bcee (patch)
tree9492cde4c155fb83cef7d63627e8647af1194015 /gui/src
parent79e6d68de4d0bbaad64529ecb432a3c4d59a3146 (diff)
downloadmullvadvpn-c147d3b36bcd1a4be37da0aaef9d49f5ce40bcee.tar.xz
mullvadvpn-c147d3b36bcd1a4be37da0aaef9d49f5ce40bcee.zip
Use the same regex to determine if GUI is a beta version
Diffstat (limited to 'gui/src')
-rw-r--r--gui/src/main/index.ts5
1 files changed, 4 insertions, 1 deletions
diff --git a/gui/src/main/index.ts b/gui/src/main/index.ts
index f23491abcb..d6a01e6fd1 100644
--- a/gui/src/main/index.ts
+++ b/gui/src/main/index.ts
@@ -64,6 +64,9 @@ const DAEMON_RPC_PATH =
const AUTO_CONNECT_FALLBACK_DELAY = 6000;
+/// Mirrors the beta check regex in the daemon. Matches only well formed beta versions
+const IS_BETA = /^(\d{4})\.(\d+)-beta(\d+)$/;
+
enum AppQuitStage {
unready,
initiated,
@@ -765,7 +768,7 @@ class ApplicationMain {
daemon: daemonVersion,
gui: guiVersion,
isConsistent: daemonVersion === guiVersion,
- isBeta: guiVersion.includes('beta'),
+ isBeta: IS_BETA.test(guiVersion),
};
this.currentVersion = versionInfo;