fix(ci): escaneia git ls-files -z no guard de conflitos — path não-ASCII derrubava o verify da main

O path public/campaign-kit/coração.png (C204) vinha citado pelo git ls-files padrão e o readFileSync estourava ENOENT no job verify do deploy (main vermelha desde o merge do C204).
This commit is contained in:
Francisco Solla 2026-09-19 10:30:42 -03:00
parent 4d37640210
commit cd4f711f29

View file

@ -851,7 +851,10 @@ describe('no conflict markers in committed files', () => {
it('keeps conflict markers out of tracked files', () => {
const offenders: string[] = []
for (const file of execSync('git ls-files', { encoding: 'utf8' }).split('\n')) {
// `-z` (NUL-separated, never quoted) keeps non-ASCII tracked paths (e.g.
// `public/campaign-kit/coração.png`) readable as-is: the default quoting
// returned `"public/...` and every read failed with ENOENT.
for (const file of execSync('git ls-files -z', { encoding: 'utf8' }).split('\0')) {
if (!file) continue
const lines = readFileSync(resolve(repoRoot, file), 'utf8').split('\n')
for (const [index, line] of lines.entries()) {