From e5c45a97444a14881edb930a45033c85af64f956 Mon Sep 17 00:00:00 2001 From: Xylar Asay-Davis Date: Mon, 16 Oct 2023 22:25:38 +0200 Subject: [PATCH] Fix conversion to absolute paths in config files We don't want to do this for config options that start with other config options. --- compass/config.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/compass/config.py b/compass/config.py index d5a9c7fcb4..505ebffb6f 100644 --- a/compass/config.py +++ b/compass/config.py @@ -38,5 +38,8 @@ def _ensure_absolute_paths(self): if not config.has_section(section): continue for option, value in config.items(section): - value = os.path.abspath(value) - config.set(section, option, value) + # not safe to make paths that start with other config options + # into absolute paths + if not value.startswith('$'): + value = os.path.abspath(value) + config.set(section, option, value)