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 user to override location of configstore directory using an environment variable #74

Open
MatejKafka opened this issue Mar 24, 2021 · 2 comments

Comments

@MatejKafka
Copy link

MatejKafka commented Mar 24, 2021

Some users may have different opinion on where configstore should store the data. For example, using C:\Users\<name>\.config on Windows is unconventional and not really common or recommended (dotfiles only tend to be used by software ported from Linux, Windows-native software always uses AppData).

Configstore should support an environment variable like CONFIGSTORE_DIR and store the config elsewhere if it is set.

@fregante
Copy link
Contributor

fregante commented Jul 12, 2024

Isn't this what XDG_CONFIG_HOME does?

XDG_CONFIG_HOME=/other/path your-cli-tool

Also the package has a path option already:

https://github.com/yeoman/configstore?tab=readme-ov-file#configpath

I think this issue can be closed.

@MatejKafka
Copy link
Author

It's a bit weird that XDG_CONFIG_HOME is followed on Windows, given that it's a Linux-only concept. Also, it appends configstore after XDG_CONFIG_HOME, you cannot use it to specify the exact directory that should be used.

Also the package has a path option already:

That's only useful for the application (and discouraged in the linked docs), not for the end user.

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