Trim whitespace/remove empty lines

This commit is contained in:
Michael B. Gale
2026-01-21 13:27:47 +00:00
parent cb2dd2ed29
commit dc2428c879
2 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -88362,7 +88362,7 @@ async function listFiles(workingDirectory) {
["ls-files"],
"Unable to list tracked files."
);
return stdout.split(os2.EOL);
return stdout.split(os2.EOL).filter((line) => line.trim().length > 0);
}
async function getGeneratedFiles(workingDirectory) {
const files = await listFiles(workingDirectory);
@@ -88376,8 +88376,8 @@ async function getGeneratedFiles(workingDirectory) {
const regex = /^([^:]+): linguist-generated: true$/;
for (const result of stdout.split(os2.EOL)) {
const match = result.match(regex);
if (match) {
generatedFiles.push(match[1]);
if (match && match[1].trim().length > 0) {
generatedFiles.push(match[1].trim());
}
}
return generatedFiles;