Check if composeinfo-base.json exists before creating it.

Previously, we checked only for `compose_dir`, but it makes
more sense to really check for `composeinfo-base.json` instead.

Signed-off-by: Jan Kaluza <jkaluza@redhat.com>
This commit is contained in:
Jan Kaluza 2020-06-23 15:26:10 +02:00
parent 658a5f805f
commit b6573fab92

View File

@ -279,7 +279,8 @@ def main():
) )
else: else:
compose_dir = opts.compose_dir compose_dir = opts.compose_dir
if not os.path.exists(compose_dir): ci_path = os.path.join(compose_dir, "work", "global", "composeinfo-base.json")
if not os.path.exists(ci_path):
ci = Compose.get_compose_info( ci = Compose.get_compose_info(
conf, compose_type=compose_type, compose_label=opts.label conf, compose_type=compose_type, compose_label=opts.label
) )