mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-06 02:03:24 +08:00
Fixed Toml decoding when table array defined before parent #1922
This commit is contained in:
@@ -26,6 +26,17 @@ func (d *dataTreeNavigator) DeeplyAssign(context Context, path []interface{}, rh
|
||||
|
||||
assignmentOp := &Operation{OperationType: assignOpType, Preferences: assignPreferences{}}
|
||||
|
||||
if rhsCandidateNode.Kind == MappingNode {
|
||||
log.Debug("[DataTreeNavigator] DeeplyAssign: deeply merging object")
|
||||
// if the rhs is a map, we need to deeply merge it in.
|
||||
// otherwise we'll clobber any existing fields
|
||||
assignmentOp = &Operation{OperationType: multiplyAssignOpType, Preferences: multiplyPreferences{
|
||||
AppendArrays: true,
|
||||
TraversePrefs: traversePreferences{DontFollowAlias: true},
|
||||
AssignPrefs: assignPreferences{},
|
||||
}}
|
||||
}
|
||||
|
||||
rhsOp := &Operation{OperationType: valueOpType, CandidateNode: rhsCandidateNode}
|
||||
|
||||
assignmentOpNode := &ExpressionNode{
|
||||
|
||||
Reference in New Issue
Block a user