fix(winget): the Log switch used |LOGPATH|, which winget never substitutes
Second field report on 0.20.0's winget path, and independent of the conflict
abort in 37781a61: an INTERACTIVE install through UniGetUI dies before the
wizard with Inno's "Error creating log file: The filename, directory name, or
volume label syntax is incorrect."
`<LOGPATH>` is winget's own token and the only spelling it replaces — the
schema this manifest declares says so verbatim ("<LOGPATH> token can be included
in the switch value so that winget will replace the token with user provided
path"). We shipped `|LOGPATH|`, which is not a token, so winget passed the
literal string to Inno; `|` is not legal in a Windows filename, and Inno refuses
before doing anything else.
Worse than the conflict abort in two ways: it is not confined to silent installs
— it fires in EVERY mode for any caller that requests a log — and UniGetUI
requests one by default, so a GUI user cannot install at all. Confirmed against
the live source, which is serving the broken switch to everyone right now:
curl -s https://winget.punktfunk.unom.io/packageManifests/unom.PunktfunkHost
→ "Log": "/LOG=\"|LOGPATH|\""
Guarded by the suite that exists for exactly this class of defect (a wrong
response shape does not fail loudly — winget just says "no package found"). The
new check accepts an absent Log switch, requires <LOGPATH> when present, and
rejects any |TOKEN| spelling. Mutation-verified: restoring |LOGPATH| fails the
check naming the offending value, and the corrected manifest passes 29/29.
⚠ Fixing the template does NOT fix the live catalogue: it is derived from the
manifest trio attached to each release, so the corrected switch only reaches
users when a release carries it.
This commit is contained in:
@@ -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. <LOGPATH> 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 <LOGPATH> token, if present",
|
||||
log === undefined || (log.includes("<LOGPATH>") && !/\|[A-Z]+\|/.test(log)),
|
||||
`got ${JSON.stringify(log)}`,
|
||||
);
|
||||
}
|
||||
{
|
||||
const res = await get("packageManifests/UNOM.PUNKTFUNKHOST");
|
||||
|
||||
@@ -35,7 +35,14 @@ InstallerSwitches:
|
||||
# gamestream, allowpublicfw, startservice, trayicon
|
||||
Silent: /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-
|
||||
SilentWithProgress: /SILENT /SUPPRESSMSGBOXES /NORESTART /SP-
|
||||
Log: /LOG="|LOGPATH|"
|
||||
# <LOGPATH> is winget's OWN token and the only spelling it substitutes (see the schema this file
|
||||
# declares: "…<LOGPATH> 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="<LOGPATH>"
|
||||
|
||||
# Inno writes its ARP entry under <AppId>_is1; this is what correlates an installed host with the
|
||||
# package for `winget list` / `winget upgrade`. Must track AppId in the .iss.
|
||||
|
||||
Reference in New Issue
Block a user