diff --git a/changelog/461.fixed.md b/changelog/461.fixed.md index 45b0d41a..98c5444c 100644 --- a/changelog/461.fixed.md +++ b/changelog/461.fixed.md @@ -1 +1 @@ -Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes \ No newline at end of file +Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes. \ No newline at end of file diff --git a/changelog/469.fixed.md b/changelog/469.fixed.md index b3ce9e53..471456f9 100644 --- a/changelog/469.fixed.md +++ b/changelog/469.fixed.md @@ -1 +1 @@ -Fixes ignored node variable in filters() \ No newline at end of file +Fixes ignored node variable in filters(). \ No newline at end of file diff --git a/changelog/fixed.md b/changelog/fixed.md index ec53c282..a25f3fa6 100644 --- a/changelog/fixed.md +++ b/changelog/fixed.md @@ -1 +1,2 @@ -Fixes using of parallel with filters for Infrahub Client Sync +Fixes using of parallel with filters for Infrahub Client Sync. +Avoid sending empty list of schemas to infrahub if no valids schemas are found. \ No newline at end of file diff --git a/infrahub_sdk/ctl/utils.py b/infrahub_sdk/ctl/utils.py index 63d7dfb8..66f86865 100644 --- a/infrahub_sdk/ctl/utils.py +++ b/infrahub_sdk/ctl/utils.py @@ -187,6 +187,9 @@ def load_yamlfile_from_disk_and_exit( has_error = False try: data_files = file_type.load_from_disk(paths=paths) + if not data_files: + console.print("[red]No valid files found to load.") + raise typer.Exit(1) except FileNotValidError as exc: console.print(f"[red]{exc.message}") raise typer.Exit(1) from exc