Skip to content

Commit 62ea902

Browse files
committed
🐛 Keep '$'s to 1 in '$FSLDIR'
1 parent bc66513 commit 62ea902

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

CPAC/utils/configuration/yaml_template.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ def dump(self, new_dict, parents=None):
164164
# SSOT FSLDIR
165165
if (isinstance(value, str) and fsldir in value and
166166
key != 'FSLDIR'):
167-
value = value.replace(fsldir, '$FSLDIR')
167+
value = re.sub(r'\$*FSLDIR', '$FSLDIR',
168+
value.replace(fsldir, '$FSLDIR'))
168169
if isinstance(value, dict):
169170
_dump += [indented_key, self.dump(new_dict, keys)]
170171
elif isinstance(value, list):

0 commit comments

Comments
 (0)