fix(scripts): make check-unused-translations cross-platform

The 2>/dev/null redirect is cmd.exe-only and creates a literal 'nul' file on
Unix shells. Removed; 'git grep ... || echo ""' already handles the
no-match exit code.
This commit is contained in:
Uruk
2026-05-22 01:46:46 +02:00
parent ac8baa5909
commit 4690d23164

View File

@@ -36,7 +36,9 @@ function isKeyUsed(key) {
// Search in TypeScript/TSX files
const result = execSync(
`git grep -l "${escapedKey}" -- "*.ts" "*.tsx" 2>nul || echo ""`,
// `2>nul` is cmd-only; omitted so this stays cross-platform (it would
// create a literal `nul` file on Unix). `|| echo ""` handles no-match.
`git grep -l "${escapedKey}" -- "*.ts" "*.tsx" || echo ""`,
{
encoding: "utf8",
cwd: path.join(__dirname, ".."),