<commit_before>import { app, ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';

const debug = require('debug')('Franz:ipcApi:autoUpdate');

export default (params) => {
  if (process.platform === 'darwin' || process.platform === 'win32') {
    ipcMain.on('autoUpdate', (event, args) => {
      try {
        autoUpdater.allowPrerelease = Boolean(params.settings.app.get('beta'));
        if (args.action === 'check') {
          autoUpdater.checkForUpdates();
        } else if (args.action === 'install') {
          debug('install update');<commit_msg>Set autoInstallOnAppQuit to false<commit_after>import { app, ipcMain } from 'electron';
import { autoUpdater } from 'electron-updater';

const debug = require('debug')('Franz:ipcApi:autoUpdate');

export default (params) => {
  if (process.platform === 'darwin' || process.platform === 'win32') {
    ipcMain.on('autoUpdate', (event, args) => {
      try {
        autoUpdater.autoInstallOnAppQuit = false;
        autoUpdater.allowPrerelease = Boolean(params.settings.app.get('beta'));
        if (args.action === 'check') {
          autoUpdater.checkForUpdates();
        } else if (args.action === 'install') {
          debug('install update');
{'fraction_non_alphanumeric': 0.16693811074918566, 'fraction_numerical': 0.003257328990228013, 'mean_word_length': 3.6553030303030303, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3379337', 'n_tokens_mistral': 378, 'n_tokens_neox': 378, 'n_words': 76}