/* @flow strict */
import { autoUpdater } from "electron-updater";

export function initAutoUpdater() {
  const log = require("electron-log");
  log.transports.file.level = "info";
  autoUpdater.logger = log;
  autoUpdater.checkForUpdatesAndNotify();
}

/* @flow strict */
import { autoUpdater } from "electron-updater";

export function initAutoUpdater() {
  if (process.env.NTERACT_DESKTOP_DISABLE_AUTO_UPDATE !== "1") {
    const log = require("electron-log");
    log.transports.file.level = "info";
    autoUpdater.logger = log;
    autoUpdater.checkForUpdatesAndNotify();
  }
}

Allow environment variable NTERACT_DESKTOP_DISABLE_AUTO_UPDATE to disable auto-update.
Allow environment variable NTERACT_DESKTOP_DISABLE_AUTO_UPDATE to disable auto-update.

Fixes #3517
