Skip to content

Commit 52fb8d2

Browse files
committed
fix(tests): terminate find -exec and pass {} — the placeholder step was a no-op
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.
1 parent e78f9e7 commit 52fb8d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tests/e2e/template_instantiation_test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ find "$TEST_REPO_PATH" -type f \
137137
sed -i "s|$placeholder|$value|g" "$file"
138138
fi
139139
done
140-
' _ "$file"
140+
' _ {} \;
141141

142142
log_pass "All placeholder tokens replaced"
143143

0 commit comments

Comments
 (0)