only check for updates if packaged

This commit is contained in:
Jeffrey Morgan 2023-07-06 14:50:46 -04:00
parent 90d4ea9d71
commit 7ee75e19ec

View file

@ -135,10 +135,12 @@ autoUpdater.setFeedURL({
url: `https://ollama.ai/api/update?os=${process.platform}&arch=${process.arch}&version=${app.getVersion()}`, url: `https://ollama.ai/api/update?os=${process.platform}&arch=${process.arch}&version=${app.getVersion()}`,
}) })
autoUpdater.checkForUpdates() if (app.isPackaged) {
setInterval(() => {
autoUpdater.checkForUpdates() autoUpdater.checkForUpdates()
}, 60000) setInterval(() => {
autoUpdater.checkForUpdates()
}, 60000)
}
autoUpdater.on('error', e => { autoUpdater.on('error', e => {
console.error('update check failed', e) console.error('update check failed', e)