Closed derekwbrown closed 7 months ago
Hi @derekwbrown
Try passing in the -UseMergingParser
as an argument to ConvertFrom-Yaml
Example:
ConvertFrom-Yaml -UseMergingParser -Ordered (gc -raw ./.gitlab-ci.yml)
Please note, the merging parser does have some limitations as stated here:
https://github.com/cloudbase/powershell-yaml?tab=readme-ov-file#merge-keys-support
But it does seem to work on the yaml from the above link.
That did indeed work. Thanks!
I have the latest powershell-yaml installed. When reading https://github.com/DataDog/datadog-agent/blob/main/.gitlab-ci.yml
powershell-yaml throws a duplicate key error. This file is properly parsed by gitlab, yamllint.com, etc.