mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Fixed passing of readonly context in pipe
This commit is contained in:
@@ -5,12 +5,12 @@ func pipeOperator(d *dataTreeNavigator, context Context, expressionNode *Express
|
||||
if expressionNode.LHS.Operation.OperationType == assignVariableOpType {
|
||||
return variableLoop(d, context, expressionNode)
|
||||
}
|
||||
|
||||
lhs, err := d.GetMatchingNodes(context, expressionNode.LHS)
|
||||
if err != nil {
|
||||
return Context{}, err
|
||||
}
|
||||
rhs, err := d.GetMatchingNodes(lhs, expressionNode.RHS)
|
||||
rhsContext := context.ChildContext(lhs.MatchingNodes)
|
||||
rhs, err := d.GetMatchingNodes(rhsContext, expressionNode.RHS)
|
||||
if err != nil {
|
||||
return Context{}, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user