diff --git a/conda_build/metadata.py b/conda_build/metadata.py index 71cbfe6b5d..91e32a2855 100644 --- a/conda_build/metadata.py +++ b/conda_build/metadata.py @@ -888,8 +888,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