-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Dasel fails to parse a "null" yaml file #99
Comments
Thank you for the clear examples. I'll take a look at this soon 👍 |
Hi @varac, I've made the changes required to get this working as expected. The fixes should also apply to other formats. The one strange thing I've noticed is that empty YAML documents are marshal'd as JSON - this is down to the YAML package being used and I have raised an issue here: go-yaml/yaml#708 echo 'null' | go dasel -p yaml .
{}
echo '---' | go dasel -p yaml .
{}
echo '' | dasel -p yaml .
{} |
Thanks! |
It seems that I'm happy to merge this in and get it released now. |
This is now released under |
Describe the bug
Dasel fails to parse yaml file with
null
as the only content.To Reproduce
echo 'null' > /tmp/null.yml
echo '---' > /tmp/null2.yml
touch /tmp/null3.yml
dasel -f /tmp/null.yml .
panic: reflect: call of reflect.Value.Interface on zero Value
Expected behavior
Dasel should not fail on valid (but empty) yaml.
Desktop (please complete the following information):
Additional context
yamllint
,yq
orytt
all don't fail on the same input files.The text was updated successfully, but these errors were encountered: