Skip to content

Commit

Permalink
fix parsing when the manifest dir is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasLaPiana committed Oct 20, 2022
1 parent f2403c9 commit 228c1fe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/fidesctl/ctl/core/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@
from fideslang.manifests import ingest_manifests
from fideslang.parse import load_manifests_into_taxonomy

from fidesctl.ctl.core.utils import echo_green
from fidesctl.ctl.core.utils import echo_green, get_manifest_list


def parse(manifests_dir: str) -> Taxonomy:
"""
Parse local manifest file(s) into a Taxonomy.
"""

# Check if any manifests exist before trying to parse them
print(f"Loading resource manifests from: {manifests_dir}")
if not get_manifest_list(manifests_dir):
print("No manifests found to parse, skipping...")
return Taxonomy()
ingested_manifests = ingest_manifests(manifests_dir)
taxonomy = load_manifests_into_taxonomy(ingested_manifests)
echo_green("Taxonomy successfully created.")
Expand Down

0 comments on commit 228c1fe

Please sign in to comment.