Skip to content
New issue

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

w and merge reformats file in an unexpected way #444

Closed
zhujik opened this issue May 24, 2020 · 2 comments
Closed

w and merge reformats file in an unexpected way #444

zhujik opened this issue May 24, 2020 · 2 comments
Labels

Comments

@zhujik
Copy link

zhujik commented May 24, 2020

For example, running

yq w -i values.yaml rbac.create false

On this file: https://raw.githubusercontent.com/helm/charts/master/stable/grafana/values.yaml

Will cause 77 lines added and 114 lines removed for just one change.

Most noticable is that he removes empty lines and moves the indentation level of some block comments.

@zhujik zhujik added the bug label May 24, 2020
@mikefarah
Copy link
Owner

Yeah unfortunately the underlying go-yaml parser does not perfectly preserve the original formatting (though I think it does a reasonable job).

@mikefarah
Copy link
Owner

go-yaml/yaml#627

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants