1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-08 11:24:16 +00:00

Make is_template respect ignores

A (false positive) "template" that should be ignored
should not make `is_template` become true.
This commit is contained in:
Marcel Robitaille
2020-12-11 01:34:09 -05:00
parent 12c3c97aef
commit 071d74fb38
3 changed files with 29 additions and 9 deletions

View File

@@ -207,7 +207,13 @@ def _dotfile_install(o, dotfile, tmpdir=None):
LOG.dbg('installing dotfile: \"{}\"'.format(dotfile.key))
LOG.dbg(dotfile.prt())
is_template = dotfile.template and Templategen.is_template(dotfile.src)
ignores = list(set(o.install_ignore + dotfile.instignore))
ignores = patch_ignores(ignores, dotfile.dst, debug=o.debug)
is_template = dotfile.template and Templategen.is_template(
dotfile.src,
ignore=ignores,
)
if hasattr(dotfile, 'link') and dotfile.link == LinkTypes.LINK:
# link
r, err = inst.install(t, dotfile.src, dotfile.dst,
@@ -222,7 +228,8 @@ def _dotfile_install(o, dotfile, tmpdir=None):
dotfile.link,
actionexec=pre_actions_exec,
is_template=is_template,
chmod=dotfile.chmod)
chmod=dotfile.chmod,
ignore=ignores)
else:
# nolink
src = dotfile.src