From 1d90b93f5b0ff4b987eb5f821a8d1cefb8a1a243 Mon Sep 17 00:00:00 2001 From: Virgil Date: Fri, 3 Apr 2026 10:31:25 +0000 Subject: [PATCH] Fix legacy loop unmarshalling --- parser.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/parser.go b/parser.go index 9e24500..0f6aa4a 100644 --- a/parser.go +++ b/parser.go @@ -560,6 +560,16 @@ func (t *Task) UnmarshalYAML(node *yaml.Node) error { } // Preserve with_together so the executor can zip legacy loop inputs at runtime. + if together, ok := m["with_together"]; ok && t.WithTogether == nil { + t.WithTogether = together + } + + // Preserve with_subelements so the executor can expand parent/child pairs at runtime. + if subelements, ok := m["with_subelements"]; ok && t.WithSubelements == nil { + t.WithSubelements = subelements + } + + // Expand with_together immediately so existing loop code sees the legacy shape. if t.WithTogether != nil && t.Loop == nil { t.Loop = expandTogetherLoop(t.WithTogether) }