Mike Farah
Mike Farah
This is an issue with the underlying go-yaml parser - please raise the issue there: https://github.com/go-yaml/yaml FWIW I created a playground example of your bug: https://play.golang.org/p/QNulMRqLfVx
Thanks @tchupp - the indentation is controlled by the underlying go-yaml parser (and has gone through a number of iterations). There are a couple of issues already raised in that...
That is strange - I've found the issue logged in the underlying yaml parser yq uses: https://github.com/go-yaml/yaml/issues/701
@rmescandon could use your help ^
Oh I see - the anchors need to go on the top. I guess it could order keys that are anchors first, then regular keys.
Ah I see - there are two issues here. 1. If there's a single item in the XML, `yq` has no way of knowing that it's an array of one....
Pleasure :) That's an easy fix as well - I'm not at my pc with yq atm but it will be something like: ```bash yq -p=xml -o=xml 'select(has(.config.watchlist)) | .config.watchlist...
Fixed in 4.28.2
Unfortunately this parameter is not exposed by the underlying yaml parser (go-yaml) - until it is not much can be done.
Ah yeah this is a hang-over (and backwards compatibility) for yq 3 - where '*' was used as a wildcard. Hmm I think the best way to fix this without...