From b7dbc825f6081fb043b626b5a4b3ac6ebb6eadb2 Mon Sep 17 00:00:00 2001 From: Renaud Heluin Date: Wed, 14 Aug 2024 23:07:29 +0200 Subject: [PATCH] feat: fix error on Update Enable Auto update #40 --- electron-app/ecoindex-app/src/main/Updater.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/electron-app/ecoindex-app/src/main/Updater.ts b/electron-app/ecoindex-app/src/main/Updater.ts index 384492f..6c57b8d 100644 --- a/electron-app/ecoindex-app/src/main/Updater.ts +++ b/electron-app/ecoindex-app/src/main/Updater.ts @@ -58,15 +58,18 @@ class Updater { // https://github.com/cnumr/lighthouse-plugin-ecoindex/releases.atom updaterLog.debug(`IS_PROD`, IS_PROD) if (IS_PROD) { - // const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-${process.arch}/${app.getVersion()}` - const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-x64/${app.getVersion()}` + let _arch = '' + if (os.platform() === 'darwin') { + _arch = 'x64' + } else _arch = os.arch() + const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-${_arch}/${app.getVersion()}` + // const feedUrl = `https://update.electronjs.org/cnumr/lighthouse-plugin-ecoindex/${process.platform}-${os.arch()}/${app.getVersion()}` const userAgent = format( '%s/%s (%s: %s)', pkg.productName, pkg.version, os.platform(), - 'x64' - // os.arch() + _arch ) updaterLog.log('feedUrl', feedUrl)