mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-08 21:54:16 +00:00
disable trans_{r,w} when linked
This commit is contained in:
@@ -49,6 +49,18 @@ class Dotfile(DictParser):
|
|||||||
raise Exception('only one trans_write allowed')
|
raise Exception('only one trans_write allowed')
|
||||||
self.upignore = upignore
|
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):
|
def get_dotfile_variables(self):
|
||||||
"""return this dotfile specific variables"""
|
"""return this dotfile specific variables"""
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user