From 4690d23164fd0f1d0d4605df9667801398bc199c Mon Sep 17 00:00:00 2001 From: Uruk Date: Fri, 22 May 2026 01:46:46 +0200 Subject: [PATCH] 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. --- scripts/check-unused-translations.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/check-unused-translations.js b/scripts/check-unused-translations.js index a9fed9e7..7baadba3 100644 --- a/scripts/check-unused-translations.js +++ b/scripts/check-unused-translations.js @@ -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, ".."),