mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-01 14:14:52 +08:00
Fixed SEGV error #1096
This commit is contained in:
@@ -22,7 +22,7 @@ type assignVarPreferences struct {
|
||||
func assignVariableOperator(d *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
|
||||
lhs, err := d.GetMatchingNodes(context.ReadOnlyClone(), expressionNode.LHS)
|
||||
if err != nil {
|
||||
return Context{}, nil
|
||||
return Context{}, err
|
||||
}
|
||||
if expressionNode.RHS.Operation.OperationType.Type != "GET_VARIABLE" {
|
||||
return Context{}, fmt.Errorf("RHS of 'as' operator must be a variable name e.g. $foo")
|
||||
|
||||
Reference in New Issue
Block a user