1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 21:23:02 +00:00

disable trans_{r,w} when linked

This commit is contained in:
deadc0de6
2019-06-02 11:57:57 +02:00
parent 44ed1a4d1f
commit 239f802228

View File

@@ -49,6 +49,18 @@ class Dotfile(DictParser):
raise Exception('only one trans_write allowed')
self.upignore = upignore
if link != LinkTypes.NOLINK and \
(
(trans_r and len(trans_r) > 0)
or
(trans_w and len(trans_w) > 0)
):
msg = '[{}] transformations disabled'.format(key)
msg += ' because dotfile is linked'
self.log.warn(msg)
trans_r = []
trans_w = []
def get_dotfile_variables(self):
"""return this dotfile specific variables"""
return {