fix(ci/update): an empty AUTHENTICODE_SHA256 broke the manifest build — jq -R needs one input line

printf '%s' hands jq -R no line at all for an empty value; its empty output made
--argjson invalid. Seen on the first live canary-manifest run.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
(cherry picked from commit a12c8bc99d41c4f7b8e4c426d560171b2b12dd5e)
This commit is contained in:
2026-07-30 15:23:52 +02:00
parent 1c836afc02
commit 73e1224345
+5 -1
View File
@@ -83,7 +83,11 @@ SERIAL="$(date +%s)"
PUBLISHED_AT="$(date -u +%Y-%m-%dT%H:%M:%SZ)"
MANIFEST="$WORK/manifest.json"
AUTH_JSON="$(printf '%s' "${AUTHENTICODE_SHA256:-}" | jq -R 'split(",") | map(select(length > 0))')"
# `printf '%s\n'`, not '%s': an EMPTY value must still hand jq one (empty) input line —
# with no line at all, `jq -R` emits nothing and `--argjson auth ""` is invalid JSON
# (bit the first live canary publish). The fallback belts the suspenders.
AUTH_JSON="$(printf '%s\n' "${AUTHENTICODE_SHA256:-}" | jq -R 'split(",") | map(select(length > 0))')"
AUTH_JSON="${AUTH_JSON:-[]}"
jq -n \
--arg channel "$CHANNEL" \
--arg version "$VERSION" \