Fix legacy loop unmarshalling
Some checks are pending
CI / test (push) Waiting to run
CI / auto-fix (push) Waiting to run
CI / auto-merge (push) Waiting to run

This commit is contained in:
Virgil 2026-04-03 10:31:25 +00:00
parent 2edc43b3fb
commit 1d90b93f5b

View file

@ -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)
}