Skip to content

Commit

Permalink
gh-122044: Don't error during gitignore filtering with no files (#122045
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sethmlarson authored Jul 27, 2024
1 parent 7a6d4cc commit 4e04d1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Tools/build/generate_sbom.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ def filter_gitignored_paths(paths: list[str]) -> list[str]:
'.gitignore:9:*.a Tools/lib.a'
"""
# No paths means no filtering to be done.
if not paths:
return []

# Filter out files in gitignore.
# Non-matching files show up as '::<whitespace><path>'
git_check_ignore_proc = subprocess.run(
Expand Down

0 comments on commit 4e04d1a

Please sign in to comment.