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

Use a crate to conform to correct config location #1

Closed
barskern opened this issue Dec 2, 2019 · 3 comments
Closed

Use a crate to conform to correct config location #1

barskern opened this issue Dec 2, 2019 · 3 comments

Comments

@barskern
Copy link

barskern commented Dec 2, 2019

Instead of manually trying to locate the correct directory for configs, you could use directories (which is even cross platform).

@barskern barskern changed the title Use a crate for config location Use a crate to conform to correct config location Dec 2, 2019
@lunacookies
Copy link
Owner

In fact, I am using a crate to locate the correct config location – dirs. However, this uses a location in ~/Library/Preferences on macOS. This is the canonical location for GUI apps, but not for CLIs, so I opted to manually override dirs’s solution for macOS builds. I copied most of that code from bat, which had an interesting discussion on this very topic (you can find the actual PR here). You do have a point, however, that directories might be more appropriate than dirs in this case.

@barskern
Copy link
Author

barskern commented Dec 2, 2019

Ah I was a bit too quick on the suggestive trigger as I did not notice dirs.

The discussion is rather interesting. Personally I use Linux and use ~/.config/ for all my configuration, so the issue doesn't directly concern me, however I do think a directories is a nice abstraction. Good luck with the choice 😄

@lunacookies
Copy link
Owner

lunacookies commented Dec 2, 2019

Thanks. I’m still not happy with the current solution, so if anyone knows of a better way, I’m all ears!

@barskern barskern closed this as completed Dec 8, 2023
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

No branches or pull requests

2 participants