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

Allow for XDG_CONFIG_HOME on darwin (macOS) #11

Open
jcrben opened this issue Dec 24, 2018 · 3 comments
Open

Allow for XDG_CONFIG_HOME on darwin (macOS) #11

jcrben opened this issue Dec 24, 2018 · 3 comments

Comments

@jcrben
Copy link

jcrben commented Dec 24, 2018

At some point I expect to open a PR to update this, but would appreciate some reassurance that it would be well-received.

Specifically, I would like to update

let mut tmp = home_dir();
to accept an environment variable specifying the location.

Ideally, it would use XDG_CONFIG_HOME on darwin - a number of utilities on the platform respect XDG_CONFIG_HOME.

When I can't set this environment variable, I use symlinks to put the file in my typical place (i.e., my dotfiles repo), which I incrementally backup with a borgbackup cron job and version some files (altho prolly not this one). In this case, I noticed that I wasn't able to set up a symlink from my dotfiles to the destination - my symlink kept getting clobbered.

@xen0n
Copy link
Owner

xen0n commented Feb 1, 2019

I investigated this when I first saw the issue but quickly got overwhelmed by Real Life:tm:. It's Chinese holiday season soon and I'll consider this in a few days.

@jonhoo
Copy link

jonhoo commented Jun 20, 2020

The easiest way to achieve this in a super nice way is to use a crate like dirs (or the slightly higher-level directories) which handles all the platform-specific tweaks for you!

@xen0n
Copy link
Owner

xen0n commented Jun 21, 2020

Moving to $XDG_CONFIG_HOME will need some migration logic in place, and that's gonna require some serious testing to avoid breaking people's installations. Currently there's no integration test written and that's why the issue is not solved 1 year later. Sorry for the radio silence on this!

Currently the CI infra based on trust is also outdated. So I plan to first address the CI issue and cut a new release, then proceed to work on this issue.

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

No branches or pull requests

3 participants