Add error checking
This commit is contained in:
parent
daf099b5ea
commit
22b88b438f
@ -249,8 +249,10 @@ def command(ctx, include, exclude, git_ssh, check_only, pull, branches, branches
|
|||||||
error_exit(f"stack {stack} does not exist")
|
error_exit(f"stack {stack} does not exist")
|
||||||
with stack_file_path:
|
with stack_file_path:
|
||||||
stack_config = yaml.safe_load(open(stack_file_path, "r"))
|
stack_config = yaml.safe_load(open(stack_file_path, "r"))
|
||||||
# TODO: syntax check the input here
|
if not "repos" in stack_config:
|
||||||
repos_in_scope = stack_config['repos']
|
error_exit(f"stack {stack} does not define any repositories")
|
||||||
|
else:
|
||||||
|
repos_in_scope = stack_config["repos"]
|
||||||
else:
|
else:
|
||||||
repos_in_scope = all_repos
|
repos_in_scope = all_repos
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user