Repository navigation
Commit ef84d45
authored
fix(tests): terminate find -exec and pass {} — the placeholder step was a no-op (#192)
`tests/e2e/template_instantiation_test.sh` ran `find … -exec bash -c '…'
_ "\$file"`, which has **two** defects on one line:
1. **No `;` or `+` terminator** — the file does not parse (`SC2067`).
2. **`"\$file"` 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 entire purpose is to prove
instantiation worked was passing without replacing a single token — a
plausible cause of estate repos shipping with literal `{{project}}`
still in their sources.
Corrected to `' _ {} \;` so `find` passes each matched path.
Found by an estate-wide 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 7a57b26 commit ef84d45
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
115 | 117 | | |
116 | 118 | | |
117 | 119 | | |
| |||
137 | 139 | | |
138 | 140 | | |
139 | 141 | | |
140 | | - | |
| 142 | + | |
141 | 143 | | |
142 | 144 | | |
143 | 145 | | |
| |||
0 commit comments