currently, we use cosmiconfig's default strategy, which is to walk "up" the tree for a config file. if cosmiconfig reaches the user's home directory, the search stops.
but if your cwd is outside of your home directory, it will search to the root fs, and stop if it can't find anything.
the strategy, IMO, should be:
use the default search
if no config file found, look in these (in order):
$HOME/<file>
$XDG_CONFIG_HOME/<file>
$(npm get prefix)/etc/<file>
/etc/<file>
This should (?) cover the usual suspects; others can use --rc to specify the path.
Need to tackle this as part of #66, because I don't want to document the current behavior, because it is dumb.
currently, we use cosmiconfig's default strategy, which is to walk "up" the tree for a config file. if cosmiconfig reaches the user's home directory, the search stops.
but if your cwd is outside of your home directory, it will search to the root fs, and stop if it can't find anything.
the strategy, IMO, should be:
$HOME/<file>
$XDG_CONFIG_HOME/<file>
$(npm get prefix)/etc/<file>
/etc/<file>
This should (?) cover the usual suspects; others can use
--rc
to specify the path.Need to tackle this as part of #66, because I don't want to document the current behavior, because it is dumb.