From b2913c7e0e0b0e1e42f5937c8f6b50d1f91c7999 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Thu, 2 May 2019 09:27:48 +0200 Subject: [PATCH] Disable auto update for osx only --- src/autoUpdater.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/autoUpdater.ts b/src/autoUpdater.ts index 4cd2234..74796b0 100644 --- a/src/autoUpdater.ts +++ b/src/autoUpdater.ts @@ -3,21 +3,21 @@ import { BuildInfo } from 'electron-telemetry/build/Model' import { UpdateInfo } from '../events' export function shouldAutoUpdate(build: BuildInfo) { - return build.package !== 'portable' + return build.package !== 'portable' && build.platform !== 'mac' } export function handleAutoUpdate() { - // autoUpdater.on('update-available', (info: UpdateInfo) => { - // console.log('There is an update available') - // }) + autoUpdater.on('update-available', (info: UpdateInfo) => { + console.log('There is an update available') + }) - // autoUpdater.on('error', (error) => { - // console.error('could not update due to error', error) - // }) + autoUpdater.on('error', (error) => { + console.error('could not update due to error', error) + }) - // try { - // autoUpdater.checkForUpdatesAndNotify() - // } catch (error) { - // console.error(error) - // } + try { + autoUpdater.checkForUpdatesAndNotify() + } catch (error) { + console.error(error) + } }