diff --git a/conda_forge_tick/migrators/cstdlib.py b/conda_forge_tick/migrators/cstdlib.py index 5d0591e89..7c8a03e76 100644 --- a/conda_forge_tick/migrators/cstdlib.py +++ b/conda_forge_tick/migrators/cstdlib.py @@ -178,8 +178,8 @@ def _process_section(output_index, attrs, lines): if line_compiler_c and line_compiler_m2c: # we have both compiler("c") and compiler("m2w64_c"), likely with complementary # selectors; add a second stdlib line after m2w64_c with respective selector - selector_m2c = " " * 8 + selector_m2c if selector_m2c else "" - to_insert = indent + '- {{ stdlib("c") }}' + selector_m2c + "\n" + selector_m2c = " " + selector_m2c if selector_m2c else "" + to_insert = indent + '- {{ stdlib("m2w64_c") }}' + selector_m2c + "\n" line_insert = line_compiler_m2c + 1 + (line_compiler_c < line_compiler_m2c) lines = lines[:line_insert] + [to_insert] + lines[line_insert:] diff --git a/tests/test_yaml/stdlib_go_after_meta.yaml b/tests/test_yaml/stdlib_go_after_meta.yaml index ce8c7d42b..98ae4bbab 100644 --- a/tests/test_yaml/stdlib_go_after_meta.yaml +++ b/tests/test_yaml/stdlib_go_after_meta.yaml @@ -59,7 +59,7 @@ outputs: - {{ compiler('fortran') }} # [unix and cgo] - {{ compiler('m2w64_c') }} # [win and cgo] - - {{ stdlib("c") }} # [win and cgo] + - {{ stdlib("m2w64_c") }} # [win and cgo] - {{ compiler('m2w64_cxx') }} # [win and cgo] - {{ compiler('m2w64_fortran') }} # [win and cgo] run: