diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 07425e404e..b92b8aa6ec 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -889,8 +889,8 @@ def get_output_dicts_from_metadata(metadata, outputs=None): outputs.append(OrderedDict(name=metadata.name())) for out in outputs: if ( - "package:" in metadata.get_recipe_text() - and out.get("name") == metadata.name() + out.get("name") == metadata.name() + and "package:" in metadata.get_recipe_text() ): combine_top_level_metadata_with_output(metadata, out) return outputs