diff --git a/packaging/winget/server/test.mjs b/packaging/winget/server/test.mjs index a3c3f6f4..9854a258 100644 --- a/packaging/winget/server/test.mjs +++ b/packaging/winget/server/test.mjs @@ -100,6 +100,16 @@ const post = (p, body) => check("manifest: installer has URL + sha256", !!inst?.InstallerUrl && /^[0-9A-F]{64}$/i.test(inst?.InstallerSha256 ?? "")); check("manifest: installer-level fields folded into the entry", inst?.InstallerType === "inno" && inst?.Scope === "machine"); check("manifest: ProductCode preserved for correlation", !!inst?.ProductCode || !!v?.ProductCodes?.length); + // A Log switch is only useful if winget SUBSTITUTES the path. is the one token it + // replaces; anything else is passed through verbatim, and `|LOGPATH|` shipped in 0.20.0 — Inno + // then rejected `|` as a filename and aborted with "Error creating log file", in EVERY install + // mode, for any caller that requests a log (UniGetUI does by default). Reported from the field. + const log = inst?.InstallerSwitches?.Log; + check( + "manifest: Log switch uses winget's token, if present", + log === undefined || (log.includes("") && !/\|[A-Z]+\|/.test(log)), + `got ${JSON.stringify(log)}`, + ); } { const res = await get("packageManifests/UNOM.PUNKTFUNKHOST"); diff --git a/packaging/winget/unom.PunktfunkHost.installer.yaml b/packaging/winget/unom.PunktfunkHost.installer.yaml index 42fff801..16e771d8 100644 --- a/packaging/winget/unom.PunktfunkHost.installer.yaml +++ b/packaging/winget/unom.PunktfunkHost.installer.yaml @@ -35,7 +35,14 @@ InstallerSwitches: # gamestream, allowpublicfw, startservice, trayicon Silent: /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- SilentWithProgress: /SILENT /SUPPRESSMSGBOXES /NORESTART /SP- - Log: /LOG="|LOGPATH|" + # is winget's OWN token and the only spelling it substitutes (see the schema this file + # declares: "… token can be included in the switch value so that winget will replace the + # token with user provided path"). It was written |LOGPATH| — not a token, so winget passed the + # literal string through and Inno rejected it: `|` is not legal in a Windows filename, giving + # "Error creating log file: The filename, directory name, or volume label syntax is incorrect." + # That aborted the install in EVERY mode, interactive included, for any caller that asks for a + # log — UniGetUI does so by default, which is how it was reported. + Log: /LOG="" # Inno writes its ARP entry under _is1; this is what correlates an installed host with the # package for `winget list` / `winget upgrade`. Must track AppId in the .iss.