You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Workaround we used to temporarily solve this was adding an empty entry
dependencies:
- item1
- item2
- item3
- item4
-
Anyway do handle this with yq alone without using wc -l to give us the array count?
We can also use docker run --rm -v ${PWD}:/workdir mikefarah/yq:latest yq r ./test.yaml -j | jq '.dependencies' | jq length but would rather only use yq if possible
We are getting an incorrect length of records when piping wc -l with v3
YAML
docker run --rm -v ${PWD}:/workdir mikefarah/yq:latest yq r ./file.yaml dependencies[*] | wc -l
returns a length of 3
docker run --rm -v ${PWD}:/workdir mikefarah/yq:2 yq r ./file.yaml dependencies[*] | wc -l
returns a length of 4 (which is correct)
The text was updated successfully, but these errors were encountered: