Skip to content

Commit

Permalink
Merge pull request #35 from synkd/create_inventory_file_if_not_present
Browse files Browse the repository at this point in the history
Create inventory file if absent when loading
  • Loading branch information
synkd authored Mar 20, 2024
2 parents 6081c0f + 414b57d commit b8d7edf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions manifester/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,8 @@ def load_inventory_file(file):
:return: list of dictionaries
"""
if not file.is_file():
file.touch()
if file.suffix not in (".yaml", ".yml"):
logger.warn(
f"Found invalid inventory file {file}. Inventory file must exist and "
Expand Down

0 comments on commit b8d7edf

Please sign in to comment.