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

complying with specifications.freedesktop.org about a default value for XDG_CONFIG_HOME #7

Merged
merged 1 commit into from
Apr 11, 2023
Merged

complying with specifications.freedesktop.org about a default value for XDG_CONFIG_HOME #7

merged 1 commit into from
Apr 11, 2023

Conversation

shemishtamesh
Copy link

@shemishtamesh shemishtamesh commented Apr 10, 2023

according to freedesktop.org's specifications: "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.".
this pull request would apply that specification.

also, the existing implementation of src/config.rs looks for the configuration file in the default directory before a specific (user defined) directory. I don't believe this was intentional. because having a default value for XDG_CONFIG_HOME would cause the code that looks for the configuration file in the specific directory to be unreachable, this pull request makes it so that the configuration is looked for in the specific directory, before the default one (and not after).

@andreykaere
Copy link
Owner

Hi! Thank you for pointing it out about specification and the wrong order of checking for config. Could you kindly format your commit messages according to this (rebase and combine two commits) and capitalize your comment. Thank you for your contribution!

@shemishtamesh
Copy link
Author

shemishtamesh commented Apr 11, 2023

the comment starts with a name of a variable (default_dir), are you sure it should be capitalized? (and thus not reflect the actual name of the variable)

@andreykaere
Copy link
Owner

Yes, it shouldn't. I first didn't notice, than noticed, but forgot 😅

- Apply freedesktop.org's specification regarding XDG_CONFIG_HOME in both the
  installation script and the final executable.
- Look for the config file in the default directory first.
@andreykaere andreykaere merged commit 961539b into andreykaere:dev Apr 11, 2023
andreykaere added a commit that referenced this pull request Dec 2, 2023
It was overwritten accidentally, when merging `complete_refactor` to
`dev`
andreykaere added a commit that referenced this pull request Dec 2, 2023
It was overwritten accidentally, when merging `complete_refactor` to
`dev`
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