From 0c9904f410e3e2a93b65ce36b221e8d481e11cca Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:52:07 +0000 Subject: [PATCH 1/2] Initial plan From fe763705fdaf23ebc741030170f9a7395f165d68 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 16:57:25 +0000 Subject: [PATCH 2/2] Fix nsis-web appPackageUrl regression: only set APP_PACKAGE_URL_IS_INCOMPLETE when URL is auto-computed Co-authored-by: mmaietta <5238867+mmaietta@users.noreply.github.com> Agent-Logs-Url: https://github.com/electron-userland/electron-builder/sessions/9dde5509-d9a6-4528-a729-9efa7ee3f1f5 --- .../src/targets/nsis/WebInstallerTarget.ts | 2 +- test/src/windows/webInstallerTest.ts | 23 ++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/packages/app-builder-lib/src/targets/nsis/WebInstallerTarget.ts b/packages/app-builder-lib/src/targets/nsis/WebInstallerTarget.ts index cad495bdc36..ccc9b4aef75 100644 --- a/packages/app-builder-lib/src/targets/nsis/WebInstallerTarget.ts +++ b/packages/app-builder-lib/src/targets/nsis/WebInstallerTarget.ts @@ -30,9 +30,9 @@ export class WebInstallerTarget extends NsisTarget { } appPackageUrl = computeDownloadUrl(publishConfigs[0], null, packager) + defines.APP_PACKAGE_URL_IS_INCOMPLETE = null } - defines.APP_PACKAGE_URL_IS_INCOMPLETE = null defines.APP_PACKAGE_URL = appPackageUrl } diff --git a/test/src/windows/webInstallerTest.ts b/test/src/windows/webInstallerTest.ts index d3e56fa5bed..495ce923ddc 100644 --- a/test/src/windows/webInstallerTest.ts +++ b/test/src/windows/webInstallerTest.ts @@ -1,5 +1,5 @@ import { Arch, Platform } from "electron-builder" -import { app } from "../helpers/packTester" +import { app, assertPack } from "../helpers/packTester" // tests are heavy, to distribute tests across CircleCI machines evenly, these tests were moved from oneClickInstallerTest @@ -52,3 +52,24 @@ test("web installer, safe name on github", ({ expect }) => }, }, })) + +test("web installer, appPackageUrl is complete URL (no arch paths appended)", ({ expect }) => + assertPack( + expect, + "test-app-one", + { + targets: Platform.WINDOWS.createTarget(["nsis-web"], Arch.x64), + config: { + publish: null, + nsisWeb: { + appPackageUrl: "https://example.com/download/latest", + }, + }, + effectiveOptionComputed: async it => { + const defines = it[0] + expect(defines.APP_PACKAGE_URL).toEqual("https://example.com/download/latest") + expect(defines.APP_PACKAGE_URL_IS_INCOMPLETE).toBeUndefined() + return true + }, + } + ))