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

return empty hash if the config file is empty #1

Merged
merged 1 commit into from
Mar 26, 2021

Conversation

brushbox
Copy link
Contributor

YAML.load_file by default falls-back to returning false if the YAML file is "empty" (a file that parses but has no YAML in it is considered empty, too. E.g. a file with contents commented-out).

This PR provides the argument fallback: {} so that an empty hash is returned - which is the desired effect.

Copy link
Owner

@johnsyweb johnsyweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@johnsyweb johnsyweb merged commit ae90c24 into johnsyweb:main Mar 26, 2021
@brushbox brushbox deleted the handle-empty-config-file branch March 26, 2021 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants