From cd4f711f29e0ea6e15834eb7d3fca8e69892a1ac Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Sat, 19 Sep 2026 10:30:42 -0300 Subject: [PATCH] =?UTF-8?q?fix(ci):=20escaneia=20git=20ls-files=20-z=20no?= =?UTF-8?q?=20guard=20de=20conflitos=20=E2=80=94=20path=20n=C3=A3o-ASCII?= =?UTF-8?q?=20derrubava=20o=20verify=20da=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- tests/unit/codebaseConventions.unit.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/unit/codebaseConventions.unit.spec.ts b/tests/unit/codebaseConventions.unit.spec.ts index 6cf130fc..06db8d18 100644 --- a/tests/unit/codebaseConventions.unit.spec.ts +++ b/tests/unit/codebaseConventions.unit.spec.ts @@ -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()) {