Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Trim whitespace/remove empty lines
  • Loading branch information
mbg committed Jan 21, 2026
commit dc2428c879fe25e44d4ebe5dbcbf41a4bd6a8a73
6 changes: 3 additions & 3 deletions lib/init-action.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/git-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ export async function listFiles(workingDirectory: string): Promise<string[]> {
["ls-files"],
"Unable to list tracked files.",
);
return stdout.split(os.EOL);
return stdout.split(os.EOL).filter((line) => line.trim().length > 0);
}

/**
Expand All @@ -434,8 +434,8 @@ export async function getGeneratedFiles(
const regex = /^([^:]+): linguist-generated: true$/;
for (const result of stdout.split(os.EOL)) {
const match = result.match(regex);
if (match) {
generatedFiles.push(match[1]);
if (match && match[1].trim().length > 0) {
generatedFiles.push(match[1].trim());
}
}

Expand Down