diff --git a/scripts/ts-check-changed-files.ts b/scripts/ts-check-changed-files.ts index 6612bb503d..bcd48955fd 100644 --- a/scripts/ts-check-changed-files.ts +++ b/scripts/ts-check-changed-files.ts @@ -3,15 +3,14 @@ import { execSync } from "child_process"; const diff = execSync(`git diff --name-only origin/main HEAD`).toString(); -const files = diff.trim().split("\n"); +const files = diff + .trim() + .split("\n") + .map((file) => file.trim()) + .filter(Boolean); console.log("ℹ️ Changed files:"); -console.log( - files - .filter(Boolean) - .map((str) => ` - ${str}`) - .join("\n") -); +console.log(files.map((str) => ` - ${str}`).join("\n")); try { console.log("⏳ Checking type errors..");