mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-05-22 06:46:46 +01:00
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:
@@ -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, ".."),
|
||||
|
||||
Reference in New Issue
Block a user