yeoman / configstore

Easily load and persist config without having to think about where and how
BSD 2-Clause "Simplified" License
868 stars 56 forks source link

Correct use of XDG_CONFIG_HOME #2

Closed passy closed 11 years ago

passy commented 11 years ago

From the XDG Base Dir Spec:

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

Previously, if $XDG_CONFIG_HOME was not set, the config path defaulted to $HOME/.config/configstore. However, if $XDG_CONFIG_HOME was set to a valid value like $HOME/.config the path would have expanded to $HOME/.config/.config/configstore.

sindresorhus commented 11 years ago

Good catch! :)