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

support XDG_CONFIG_HOME for configuration file on macOS #6181

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

heygarrett
Copy link

@heygarrett heygarrett commented Jun 2, 2024

Fixes #4613

Replacing dirs with etcetera adds support for checking XDG_CONFIG_HOME on macOS when looking for a configuration file.

I'm new to Rust, so let me know if I'm missing anything!

@ytmimi
Copy link
Contributor

ytmimi commented Jun 25, 2024

I took a quick look at the dirs README and the dirs code, and both seem to suggest that XDG_CONFIG_HOME is already supported by dirs.

@ytmimi ytmimi closed this Jun 25, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Jun 25, 2024

Oh wait, that's just for linux. Reopening.

@ytmimi ytmimi reopened this Jun 25, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Jun 25, 2024

@heygarrett we've had issues in the past where users have reported configs not being loaded properly. To avoid any breakage due to the proposed switch to etcetera I think we'll need to include some tests to validate that the existing config loading behavior won't change, and that we're only adding support for new config directories.

In the past I tried adding tests for the config loading rules, though I'm not entirely sure if that old PR is the best approach for this. Maybe you can use it as inspiration though.

@heygarrett
Copy link
Author

Thanks, @ytmimi! I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Does rustfmt look in $HOME/.config/rustfmt on macOS?
3 participants