-
Notifications
You must be signed in to change notification settings - Fork 216
Closed
Labels
Milestone
Description
The order of base directories denotes their importance; the first directory listed is the most important. When the same information is defined in multiple places the information defined relative to the more important base directory takes precedent.
Meaning that, if I set XDG_CONFIG_DIRS to $HOME/hi:$HOME/lo, then $HOME/hi should have higher priority.
EasyBuild handles this the wrong way, though:
$ export XDG_CONFIG_DIRS=$HOME/hi:$HOME/lo
$ mkdir -p $HOME/{hi,lo}/easybuild.d
$ touch $HOME/{hi,lo}/easybuild.d/bla.cfg
$ eb --show-default-configfiles
Default list of configuration files:
[with $XDG_CONFIG_HOME: (not set), $XDG_CONFIG_DIRS: /home/runiq/hi:/home/runiq/lo]
* user-level: ${XDG_CONFIG_HOME:-$HOME/.config}/easybuild/config.cfg
-> /home/runiq/.config/easybuild/config.cfg => found
* system-level: ${XDG_CONFIG_DIRS:-/etc}/easybuild.d/*.cfg
-> {/home/runiq/hi, /home/runiq/lo}/easybuild.d/*.cfg => /home/runiq/hi/easybuild.d/bla.cfg, /home/runiq/lo/easybuild.d/bla.cfg
Default list of existing configuration files (3): /home/runiq/hi/easybuild.d/bla.cfg, /home/runiq/lo/easybuild.d/bla.cfg, /home/runiq/.config/easybuild/config.cfg