Open MatejKafka opened 3 years ago
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.
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.
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 usesAppData
).Configstore should support an environment variable like
CONFIGSTORE_DIR
and store the config elsewhere if it is set.