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

fix dynvariables being executed twice (#83)

This commit is contained in:
deadc0de6
2019-02-04 21:39:00 +01:00
parent 5798c78309
commit 9d081957fc
3 changed files with 9 additions and 8 deletions

View File

@@ -20,11 +20,12 @@ TILD = '~'
class Updater:
def __init__(self, conf, dotpath, profile, dry, safe,
def __init__(self, conf, dotpath, profile, variables, dry, safe,
iskey=False, debug=False, ignore=[], showpatch=False):
self.conf = conf
self.dotpath = dotpath
self.profile = profile
self.variables = variables
self.dry = dry
self.safe = safe
self.iskey = iskey
@@ -155,8 +156,7 @@ class Updater:
def _resolve_template(self, tpath):
"""resolve the template to a temporary file"""
variables = self.conf.get_variables(self.profile)
t = Templategen(variables=variables, base=self.dotpath,
t = Templategen(variables=self.variables, base=self.dotpath,
debug=self.debug)
return t.generate(tpath)