Skip to content

Commit 02b6032

Browse files
Alberto Gireudarthurzam
authored andcommitted
Fix config loading if XDG_CONFIG_HOME is defined
Signed-off-by: Alberto Gireud <agireud@amazon.com> Closes: #573 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent fdcf83d commit 02b6032

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

doc/man/config.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ Config file support
44
Config files are supported by ``pkgcheck scan`` from any of four locations.
55
Listed in order of increasing precedence these include the following:
66

7-
- system config -- /etc/pkgcheck/pkgcheck.conf
8-
- user config -- ~/.config/pkgcheck/pkgcheck.conf
9-
- repo config -- metadata/pkgcheck.conf inside an ebuild repo
10-
- custom config -- specified via the --config option
7+
- system config -- ``/etc/pkgcheck/pkgcheck.conf``
8+
- user config -- ``${XDG_CONFIG_HOME}/pkgcheck/pkgcheck.conf``
9+
- user config -- ``~/.config/pkgcheck/pkgcheck.conf``
10+
- repo config -- ``metadata/pkgcheck.conf`` inside an ebuild repo
11+
- custom config -- specified via the ``--config`` option
1112

1213
Any settings from a config file with higher precedence will override matching
1314
settings from a config file with a lower precedence, e.g. repo settings

src/pkgcheck/const.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def _GET_CONST(attr, default_value):
3232
setattr(
3333
_module,
3434
var_name,
35-
os.environ.get(xdg_var, os.path.join(os.path.expanduser(fallback_dir), "pkgcheck")),
35+
os.path.join(os.environ.get(xdg_var, os.path.expanduser(fallback_dir)), "pkgcheck"),
3636
)
3737

3838
REPO_PATH = _GET_CONST("REPO_PATH", _reporoot)

0 commit comments

Comments
 (0)