From 687056f3f5e78b3b14acb91ad073ba9fd09b74fc Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 9 Sep 2026 02:29:08 +0300 Subject: [PATCH] ci: check-inputs trackedFiles no longer prints git noise on synthetic trees MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `execFileSync('git ls-files')` inherited stderr, so every call on a test's temporary tree printed "fatal: not a git repository" although the failure is caught and the tree is walked instead — dozens of lines in the owner's Windows run and in CI logs. stderr is ignored; behaviour unchanged. Issue: #496 User-Visible: no --- scripts/check-inputs.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/check-inputs.mjs b/scripts/check-inputs.mjs index b614771a..e66012cd 100755 --- a/scripts/check-inputs.mjs +++ b/scripts/check-inputs.mjs @@ -85,7 +85,10 @@ const matchesAny = (file, globs) => globs.some((glob) => globToRegExp(glob).test /** Отслеживаемые файлы (git), либо обход дерева там, где git недоступен. */ export function trackedFiles(root) { try { - const out = execFileSync('git', ['-C', root, 'ls-files', '-z'], { encoding: 'utf8' }); + // stderr глушится (#496): на синтетических деревьях тестов git отвечает + // «fatal: not a git repository», и без этого каждый вызов печатал его в лог, + // хотя отказ штатно ловится ниже и дерево обходится вручную. + const out = execFileSync('git', ['-C', root, 'ls-files', '-z'], { encoding: 'utf8', stdio: ['ignore', 'pipe', 'ignore'] }); const files = out.split('\0').filter(Boolean); if (files.length) return files.sort(); } catch { /* не git — обходим дерево */ }