mirror of
https://github.com/mikefarah/yq.git
synced 2026-09-05 17:36:59 +08:00
Fixed SEGV error #1096
This commit is contained in:
@@ -13,6 +13,12 @@ var variableOperatorScenarios = []expressionScenario{
|
||||
"D0, P[], (doc)::{}\n",
|
||||
},
|
||||
},
|
||||
{
|
||||
document: "a: [cat]",
|
||||
skipDoc: true,
|
||||
expression: "(.[] | {.name: .}) as $item",
|
||||
expectedError: `Cannot index array with 'name' (strconv.ParseInt: parsing "name": invalid syntax)`,
|
||||
},
|
||||
{
|
||||
description: "Single value variable",
|
||||
document: `a: cat`,
|
||||
|
||||
Reference in New Issue
Block a user