Skip to content

Commit

Permalink
expressionNode
Browse files Browse the repository at this point in the history
  • Loading branch information
hilmarf committed Jan 8, 2025
1 parent 49145f0 commit 3f7944c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/utils/subst/subst.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,12 +190,12 @@ func (f *fileinfo) substituteByValue(path string, value *yqlib.CandidateNode) er
yqlib.InitExpressionParser()
expr := "." + path + " |= $newValue"

nd, err := yqlib.ExpressionParser.ParseExpression(expr)
expressionNode, err := yqlib.ExpressionParser.ParseExpression(expr)
if err != nil {
return err
}

ngvtr := yqlib.NewDataTreeNavigator()
_, err = ngvtr.GetMatchingNodes(ctxt, nd)
_, err = ngvtr.GetMatchingNodes(ctxt, expressionNode)
return err
}

0 comments on commit 3f7944c

Please sign in to comment.