Fixed merge anchor bug #800

This commit is contained in:
Mike Farah
2021-05-09 13:26:02 +10:00
parent 37f3e21970
commit ae4b606707
4 changed files with 128 additions and 8 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ func explodeNode(node *yaml.Node, context Context) error {
} else {
if valueNode.Kind == yaml.SequenceNode {
log.Debugf("an alias merge list!")
for index := 0; index < len(valueNode.Content); index = index + 1 {
for index := len(valueNode.Content) - 1; index >= 0; index = index - 1 {
aliasNode := valueNode.Content[index]
err := applyAlias(node, aliasNode.Alias, index, context.ChildContext(newContent))
if err != nil {