Skip to content

Commit

Permalink
Fix conversion to absolute paths in config files
Browse files Browse the repository at this point in the history
We don't want to do this for config options that start with
other config options.
  • Loading branch information
xylar committed Oct 16, 2023
1 parent ddbe352 commit e5c45a9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions compass/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e5c45a9

Please sign in to comment.