When XDG_CONFIG_HOME
is defined cointop places the config.toml in $XDG_CONFIG_HOME/.config/cointop
#57
Labels
bug
Something isn't working
When a user has defined the environment variable
XDG_CONFIG_HOME
, the expected behavior of programs that use that environment variable is to place their config directory in$XDG_CONFIG_HOME/<name of app>/
. On first startup ofcointop
it does not follow the expected behavior and instead places its config directory in$XDG_CONFIG_HOME/.config/cointop/
. This breaks automation scripts that expect the app to properly leverage the environment variable (ex. scripting downloading cointop and placing the color schemes in thecointop
config directory).One way to fix this could be to change
defaultConfigFilePath
call a function that checks ifXDG_CONFIG_HOME
is defined and would either return the expanded value of$XDG_CONFIG_HOME/cointop/config.toml
or~/.config/cointop/config.toml
ifXDG_CONFIG_HOME
is not defined.System Information:
Steps to reproduce:
XDG_CONFIG_HOME
environment variable in your shell's rc file or$HOME/.profile
cointop
usinggo get -u github.com/miguelmota/cointop
cointop
and runls -a $XDG_CONFIG_HOME
to verify that$XDG_CONFIG_HOME
does not contain acointop
directory, but does contain a.config
directory with acointop
subdirectory.The text was updated successfully, but these errors were encountered: