-
-
Notifications
You must be signed in to change notification settings - Fork 135
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
[BUG] Dasel crash when reading an empty file #374
Comments
Thanks for highlighting this @Larandar . Dasel has an issue with nulls at the moment, stemming from the fact that it uses reflection internally. That said, it shouldn't be too hard to get this working. I'll work on this soon. |
I think I accidentally broke this by commenting this out: dasel/internal/command/select.go Line 107 in 3bfb5dd
I'll try and verify this tonight |
This has been fixed in the development release and will be released soon. |
Ha, the good old "I'm sure this code is not applicable anymore" 👍 |
Hey @Larandar, This was included in the last release.
|
Describe the bug
Dasel will crash if called on an empty file, even if it's
by specificationin most implementations interpreted as a valid file for that format (yaml and toml).(Yes, I just read both TOML and YAML specs, and it's ambiguous as in both case an unquoted empty string is corresponding to
nil
but the lexer seems to assume at least one identifier)To Reproduce
Will fail:
Expected behavior
Such files should be handled like most parsers interpreted it, so
nil
. This way creating a new toml file can be as simple as:touch /tmp/state.toml dasel put -f /tmp/toml .state.last-execution -t string -v $(date -Iseconds)
Desktop (please complete the following information):
dasel version 2.4.1
The text was updated successfully, but these errors were encountered: