main_cli: pass proper libdir to meta.Index

In case `--libdir` is not specified on the command line, and thus
`args.libdir` is `None`, pass the standard `/usr/lib/osbuild` path
to the meta.Index constructor. Otherwise no schema information can
be found.
This commit is contained in:
Christian Kellner 2020-05-06 18:30:36 +02:00
parent 5516102fdb
commit 9fce523f76

View file

@ -102,7 +102,7 @@ def osbuild_cli(*, sys_argv=[]):
manifest = parse_manifest(args.manifest_path)
# first thing after parsing is validation of the input
index = osbuild.meta.Index(args.libdir)
index = osbuild.meta.Index(args.libdir or "/usr/lib/osbuild")
res = osbuild.meta.validate(manifest, index)
if not res:
if args.json or args.inspect: