diff options
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..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); |
