From 1a744796648a2b080f1029d02cec6499e617f1d7 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Wed, 26 Aug 2026 18:33:04 +0100 Subject: [PATCH] =?UTF-8?q?fix(tests):=20terminate=20find=20-exec=20and=20?= =?UTF-8?q?pass=20{}=20=E2=80=94=20the=20placeholder=20step=20was=20a=20no?= =?UTF-8?q?-op?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit tests/e2e/template_instantiation_test.sh ran: find ... -exec bash -c ' file="$1" ... grep/sed over $file ... ' _ "$file" Two defects in that one line: 1. No ';' or '+' terminator, so the file does not parse (SC2067). 2. "$file" is passed where {} belongs. $file is assigned ONLY inside the -exec body, so in the outer scope it is UNSET — $1 arrived empty, file="" and every grep/sed operated on an empty path. ⚠ The consequence is worse than a lint error: the placeholder-replacement step SILENTLY DID NOTHING, then logged "All placeholder tokens replaced". A test whose whole purpose is to prove instantiation worked was passing without replacing a single token. That is a plausible cause of estate repos shipping with literal {{project}} tokens still in their sources. Corrected to "' _ {} \;" so find passes each matched path. Found by an estate-wide shellcheck sweep of 5,111 scripts across 375 repos: this identical stale copy exists in 30 repositories. rsr-template-repo's own copy is already correct and restructured (371 lines vs the 268 here), so these are stale duplicates that never picked up the upstream fix. --- tests/e2e/template_instantiation_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/e2e/template_instantiation_test.sh b/tests/e2e/template_instantiation_test.sh index 73a7d8d..e79f02a 100755 --- a/tests/e2e/template_instantiation_test.sh +++ b/tests/e2e/template_instantiation_test.sh @@ -137,7 +137,7 @@ find "$TEST_REPO_PATH" -type f \ sed -i "s|$placeholder|$value|g" "$file" fi done - ' _ "$file" + ' _ {} \; log_pass "All placeholder tokens replaced"