From 1d741d8932af076f045b1cb16b7f69110fe920aa Mon Sep 17 00:00:00 2001 From: Tom Butcher Date: Sat, 8 Aug 2026 21:10:12 +0100 Subject: [PATCH] Add artifact filtering for CEF installer in app update process - Introduced isCefInstallerArtifact function to identify CEF installer artifacts based on their file names. - Updated artifact selection logic to filter out CEF installer artifacts, ensuring only relevant updates are processed. - Enhanced overall update handling by improving artifact management and reducing unnecessary processing. --- public/appupdate.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/public/appupdate.js b/public/appupdate.js index 52201bc..96c0054 100644 --- a/public/appupdate.js +++ b/public/appupdate.js @@ -25,6 +25,11 @@ let runningUpdate = null const getArtifactName = (artifact) => String(artifact?.fileName || artifact?.relativePath || artifact?.url || '') +const isCefInstallerArtifact = (artifact) => { + const name = getArtifactName(artifact).toLowerCase() + return name.endsWith('-cef.exe') || name.endsWith('-cef.pkg') +} + const normalizeArch = (arch) => { if (arch === 'x64' || arch === 'amd64') return 'x64' if (arch === 'arm64' || arch === 'aarch64') return 'arm64' @@ -69,7 +74,9 @@ const selectUpdateArtifact = ( throw new Error(`App updates are not supported on ${platform}.`) } - const artifacts = Array.isArray(update?.artifacts) ? update.artifacts : [] + const artifacts = (Array.isArray(update?.artifacts) ? update.artifacts : []).filter( + (artifact) => !isCefInstallerArtifact(artifact) + ) const matchingArtifact = artifacts.find((artifact) => artifactMatchesPlatform(artifact, target, platform, arch) )