diff options
| author | Emīls <emils@mullvad.net> | 2020-06-25 11:56:13 +0100 |
|---|---|---|
| committer | Emīls <emils@mullvad.net> | 2020-06-25 15:21:31 +0100 |
| commit | c147d3b36bcd1a4be37da0aaef9d49f5ce40bcee (patch) | |
| tree | 9492cde4c155fb83cef7d63627e8647af1194015 /gui | |
| parent | 79e6d68de4d0bbaad64529ecb432a3c4d59a3146 (diff) | |
| download | mullvadvpn-c147d3b36bcd1a4be37da0aaef9d49f5ce40bcee.tar.xz mullvadvpn-c147d3b36bcd1a4be37da0aaef9d49f5ce40bcee.zip | |
Use the same regex to determine if GUI is a beta version
Diffstat (limited to 'gui')
| -rw-r--r-- | gui/src/main/index.ts | 5 |
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; |
