We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug When setting headComment, the comment is added after the field or inside the object instead of being prepended above the field.
Version of yq: 4.7.0 (also failed on 4.5.1) Operating system: mac Installed via: homebrew
Input Yaml
foo: default: bar description: baz
Command
yq e -P '.[] headComment |= .description | .[] |= .default'
Actual behavior
foo: bar # baz
Expected behavior
# baz foo: bar
foo: default: qux: quo description: baz
foo: # baz qux: quo
# baz foo: qux: quo
The text was updated successfully, but these errors were encountered:
This is a problem with the underlying go-yaml parser - it's not very good at placing comments correctly :(
Looks related to go-yaml/yaml#695
Sorry, something went wrong.
Possibly go-yaml/yaml#610
No branches or pull requests
Describe the bug
When setting headComment, the comment is added after the field or inside the object instead of being prepended above the field.
Version of yq: 4.7.0 (also failed on 4.5.1)
Operating system: mac
Installed via: homebrew
Example 1
Input Yaml
Command
Actual behavior
Expected behavior
Example 2:
Input Yaml
Command
Actual behavior
Expected behavior
The text was updated successfully, but these errors were encountered: