Skip to content

Commit

Permalink
check_yaml: handle the case where there are no specified yaml files
Browse files Browse the repository at this point in the history
This can occur when a new taxonomy repo is created, for example. So we
now display a message and exit with a zero exit code.

Signed-off-by: BJ Hargrave <[email protected]>
  • Loading branch information
bjhargrave committed Aug 20, 2024
1 parent f876908 commit 4e07c73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/check-yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ def check(self) -> int:
)
if taxonomy.errors > 0:
exit_code = 1
if not self.yaml_files:
print("No yaml files specified.")
return exit_code


Expand Down Expand Up @@ -109,7 +111,7 @@ def cli() -> int:
parser.add_argument(
"yaml_file",
help="A qna.yaml file.",
nargs="+",
nargs="*",
type=pathlib.Path,
)
args = parser.parse_args()
Expand Down

0 comments on commit 4e07c73

Please sign in to comment.