Skip to content

Commit

Permalink
🐛(ozi-fix missing): warn on missing required directories
Browse files Browse the repository at this point in the history
Signed-off-by: rjdbcm <[email protected]>
  • Loading branch information
rjdbcm committed Jul 6, 2024
1 parent 3b85987 commit 8486918
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ozi/fix/build_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,16 @@ def process(
found_files: list[str] | None = None,
) -> list[str]:
"""Process an OZI project build definition's files."""
extra_files = [
file
for file in os.listdir(target / rel_path)
if os.path.isfile(target / rel_path / file)
and not os.path.islink(target / rel_path / file)
]
try:
extra_files = [
file
for file in os.listdir(target / rel_path)
if os.path.isfile(target / rel_path / file)
and not os.path.islink(target / rel_path / file)
]
except FileNotFoundError:
TAP.not_ok('Missing required project directory.')
extra_files = []
found_files = found_files if found_files else []
extra_files = list(set(extra_files).symmetric_difference(set(found_files)))
return inspect_files(
Expand Down

0 comments on commit 8486918

Please sign in to comment.