소스 검색

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()}`,
 })
 
-autoUpdater.checkForUpdates()
-setInterval(() => {
+if (app.isPackaged) {
   autoUpdater.checkForUpdates()
-}, 60000)
+  setInterval(() => {
+    autoUpdater.checkForUpdates()
+  }, 60000)
+}
 
 autoUpdater.on('error', e => {
   console.error('update check failed', e)