From 469c1b7a6e6a5be857c3be719bb65903d88169ba Mon Sep 17 00:00:00 2001 From: Susmitha Girumala Date: Thu, 16 Sep 2021 10:56:51 -0400 Subject: [PATCH] chore: Add dev flag to disable app updater prompts - desktop --- ui/desktop/README.md | 1 + ui/desktop/electron-app/src/helpers/app-updater.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/ui/desktop/README.md b/ui/desktop/README.md index 8efc3e47f..79562fe2e 100644 --- a/ui/desktop/README.md +++ b/ui/desktop/README.md @@ -78,6 +78,7 @@ These environment variables may be used to customized the build. | `APP_UPDATER_LATEST_VERSION_TAG` | Next version for comparison with current version. | | `APP_UPDATER_LATEST_VERSION_LOCATION` | Location of app release to use for updating client. Can be a filepath or url. | | `BYPASS_CLI_SETUP` | Disable download and extraction of cli. For development use only. | +| `BYPASS_APP_UPDATER` | Disable app updater feature. For development use only. | ### Building for Production diff --git a/ui/desktop/electron-app/src/helpers/app-updater.js b/ui/desktop/electron-app/src/helpers/app-updater.js index 70e4a8426..70dcc7498 100644 --- a/ui/desktop/electron-app/src/helpers/app-updater.js +++ b/ui/desktop/electron-app/src/helpers/app-updater.js @@ -124,6 +124,11 @@ const displayDownloadPrompt = (version, url) => { **/ module.exports = { run: async ({ suppressNoUpdatePrompt } = {}) => { + /** + * Ignore app updater prompts. + */ + if (process.env.BYPASS_APP_UPDATER) return; + /** * Disable app updater check for linux as update is unsupported. * TODO: Enable for windows pending feature dev. Windows is supported.