浏览代码

only check for updates if packaged

Jeffrey Morgan 1 年之前
父节点
当前提交
7ee75e19ec
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      app/src/index.ts

+ 5 - 3
app/src/index.ts

@@ -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()
-setInterval(() => {
+if (app.isPackaged) {
   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)