mirror of
https://github.com/fsolla/teqo.git
synced 2026-11-13 06:43:06 +00:00
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:
parent
4d37640210
commit
cd4f711f29
1 changed files with 4 additions and 1 deletions
|
|
@ -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()) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue