mirror of https://github.com/ceph/go-ceph
contrib: have apiage fail if no source data is available
It is kind of pointless to let the tool run if no source data is present, so treat empty/missing source as an error. Signed-off-by: John Mulligan <jmulligan@redhat.com>
This commit is contained in:
parent
0d5ae4da1f
commit
689ee58bf8
|
@ -278,6 +278,12 @@ def main():
|
|||
api_src = read_json(cli.source) if cli.source else {}
|
||||
api_tracked = read_json(cli.current) if cli.current else {}
|
||||
|
||||
if not api_src:
|
||||
print(
|
||||
f"error: no source data found (path: {cli.source})", file=sys.stderr
|
||||
)
|
||||
sys.exit(1)
|
||||
|
||||
if cli.current_tag:
|
||||
tag_to_versions(cli, cli.current_tag)
|
||||
|
||||
|
|
Loading…
Reference in New Issue