diff --git a/docs/USER-DOCUMENTATION.md b/docs/USER-DOCUMENTATION.md index 08b86767..7bc9a7f5 100644 --- a/docs/USER-DOCUMENTATION.md +++ b/docs/USER-DOCUMENTATION.md @@ -99,6 +99,26 @@ run Etcher on a GNU/Linux system. - liblzma (for xz decompression) +Disable update notifications +---------------------------- + +You can disable update notifications, which can be useful when running Etcher +outside a common desktop environment (like in a [Resin.io][resin.io] +application), by setting the `ETCHER_DISABLE_UPDATES` environment variable. + +In GNU/Linux and Mac OS X: + +```sh +export ETCHER_DISABLE_UPDATES=1 +``` + +In Windows: + +```sh +set ETCHER_DISABLE_UPDATES=1 +``` + +[resin.io]: https://resin.io [appimage]: http://appimage.org [xwayland]: https://wayland.freedesktop.org/xserver.html [weston.ini]: http://manpages.ubuntu.com/manpages/wily/man5/weston.ini.5.html diff --git a/lib/gui/app.js b/lib/gui/app.js index fc9cd5a4..f41d6b8f 100644 --- a/lib/gui/app.js +++ b/lib/gui/app.js @@ -65,7 +65,7 @@ const app = angular.module('Etcher', [ app.run((AnalyticsService, UpdateNotifierService, SelectionStateModel) => { AnalyticsService.logEvent('Application start'); - if (UpdateNotifierService.shouldCheckForUpdates()) { + if (UpdateNotifierService.shouldCheckForUpdates() && !process.env.ETCHER_DISABLE_UPDATES) { AnalyticsService.logEvent('Checking for updates'); UpdateNotifierService.isLatestVersion().then((isLatestVersion) => {