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
Empty string becoming null when modifying YAML #400
Comments
Workaround For the moment I added an additonal pipe with:
But workarounds are not a solution since they don't solve the original problem but cure the effect ;) |
Hey @blurayne, my guess this is how the yaml parser is interpreting the value. Does it help if you change the original file to be |
Nope. In the original I had key: | with just a newline. Reading via |
Thanks for the info. I'll do some digging when I get a chance |
I use dasel in a helm filter to modify template for k8s.
Unfortunately modifying YAML ends in empty string becoming null.
How to reproduce
foo.yaml
:Now modify:
Now watch the value for key
script
Version
Tested on Linux AMD64, dasel version v2.7.0
I just downloaded that release after I encountered the bug with an older release (some weeks old).
What else?
If this is standard behavior it would be nyce to add a command-line flag to change this. Dasel is far easier to use then kustomize. Also tools like jq/yq/oq don't help since they cannot parse manifests divided by '---'.
The text was updated successfully, but these errors were encountered: