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

Fix looking up 'XDG_CONFIG_HOME' envvar #2

Merged
merged 4 commits into from Apr 1, 2022

Conversation

a5ob7r
Copy link
Contributor

@a5ob7r a5ob7r commented Mar 30, 2022

README says that 'era' lookups "$XDG_CONFIG_HOME" as a configuration directory, but it used to just lookup "$HOME/.config". I guess this doesn't make sense. So 'era' first lookups "$XDG_CONFIG_HOME", and if not found the variable, 'era' assumes the value is ~/.config/era now. This behavior probably is familiar in CLI application configurations.

And this patch fixes misc trivial stuffs.

Thank you for your cool CLI application.

README says that 'era' lookups "$XDG_CONFIG_HOME" as a configuration
directory, but it used to just lookup "$HOME/.config". I guess this
doesn't make sense. So 'era' first lookups "$XDG_CONFIG_HOME", and if
not found the variable, 'era' assumes the value is ~/.config/era now.
This behavior probably is familiar in CLI application configurations.
Parent directories of a configuration directory may not exist, and
'mkdir' emits an error such as 'No such file or directory (os error 2)'
in such a case. So we add a 'recursive' option to make parent
directories too.
@kyoheiu
Copy link
Owner

kyoheiu commented Apr 1, 2022

Thank you! Agreed.

@kyoheiu kyoheiu merged commit 39d02f8 into kyoheiu:main Apr 1, 2022
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.

None yet

2 participants