1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-04 17:24:46 +00:00

Allowing templating on config variables and redefining templater when changing variables

This commit is contained in:
Davide Laezza
2020-08-25 00:01:15 +02:00
parent 2bf4740f10
commit 75050cd4b6

View File

@@ -142,7 +142,7 @@ class CfgYaml:
# parse the "variables" block
var = self._parse_blk_variables(self._yaml_dict)
self._add_variables(var, template=False)
self._add_variables(var, template=True)
# parse the "dynvariables" block
dvariables = self._parse_blk_dynvariables(self._yaml_dict)
@@ -1100,6 +1100,8 @@ class CfgYaml:
val = t.generate_string(val)
variables[k] = val
t.update_variables(variables)
if variables is self.variables:
self._redefine_templater()
def _get_profile_included_vars(self):
"""resolve profile included variables/dynvariables"""