From 6b1b541db3b11a23ed3a6abae5ad9883f055c0d7 Mon Sep 17 00:00:00 2001 From: Pieter Viljoen Date: Fri, 25 Sep 2026 22:40:05 -0700 Subject: [PATCH] Route configure.sh's ruleset_id() Through jqr (#1253) `ruleset_id()`'s id extraction used a plain `jq -r`, so a native Windows jq's trailing CR reached the `rulesets/` API URL and broke the live-state fetch `check_ruleset()` and `apply_ruleset()` depend on. Route it through the existing `jqr()` helper, matching every other CRLF-exposed site in this file. An adversarial local-review pass over this one-line diff found no introduced defects, and three pre-existing plain-`jq` sites of the same class elsewhere in the file, filed separately as #1880, #1881, #1882 rather than expanding this fix's scope. Closes on promotion: #1253 Co-Authored-By: Claude Sonnet 5 --- repo-config/configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repo-config/configure.sh b/repo-config/configure.sh index 56eac311..3d9b0701 100755 --- a/repo-config/configure.sh +++ b/repo-config/configure.sh @@ -147,7 +147,7 @@ ruleset_id() { return 1 fi # shellcheck disable=SC2016 # $n is a jq --arg variable, not a shell expansion - ids="$(jq -r --arg n "$1" '.[] | select(.name==$n) | .id' <<<"$out")" + ids="$(jqr --arg n "$1" '.[] | select(.name==$n) | .id' <<<"$out")" if [ -z "$ids" ]; then return 0; fi # Pre-existing drift can leave more than one ruleset with the same name. # Use the first and warn, so the duplicates get resolved rather than silently operating on the wrong one.