Skip to content

Commit 19a03ae

Browse files
authored
Merge pull request #472 from opsmill/bkr-fix-load-schemas
Add check for empty list of schema
2 parents 6465b92 + 8c71f45 commit 19a03ae

File tree

4 files changed

+7
-3
lines changed

4 files changed

+7
-3
lines changed

changelog/461.fixed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes
1+
Fixes processing of relationshhip during nodes retrieval using the Sync Client, when prefecthing related_nodes.

changelog/469.fixed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Fixes ignored node variable in filters()
1+
Fixes ignored node variable in filters().

changelog/fixed.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Fixes using of parallel with filters for Infrahub Client Sync
1+
Fixes using of parallel with filters for Infrahub Client Sync.
2+
Avoid sending empty list of schemas to infrahub if no valids schemas are found.

infrahub_sdk/ctl/utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,9 @@ def load_yamlfile_from_disk_and_exit(
187187
has_error = False
188188
try:
189189
data_files = file_type.load_from_disk(paths=paths)
190+
if not data_files:
191+
console.print("[red]No valid files found to load.")
192+
raise typer.Exit(1)
190193
except FileNotValidError as exc:
191194
console.print(f"[red]{exc.message}")
192195
raise typer.Exit(1) from exc

0 commit comments

Comments
 (0)