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

deprecate link:link

This commit is contained in:
deadc0de6
2022-05-31 17:38:31 +02:00
committed by deadc0de
parent 70173bc294
commit cda6d08f5f

View File

@@ -1143,9 +1143,23 @@ class CfgYaml:
dotfile[self.key_dotfile_link] = new
self._dirty = True
self._dirty_deprecated = True
self._log.warn('deprecated \"link\" value')
warn = 'deprecated \"link: <boolean>\"'
warn += ', updated to \"link: {}\"'.format(new)
self._log.warn(warn)
elif old_key in dotfile and \
if self.key_dotfile_link in dotfile and \
dotfile[self.key_dotfile_link] == self.lnk_link:
# patch "link: link"
# to "link: absolute"
new = self.lnk_absolute
dotfile[self.key_dotfile_link] = new
self._dirty = True
self._dirty_deprecated = True
warn = 'deprecated \"link: link\"'
warn += ', updated to \"link: {}\"'.format(new)
self._log.warn(warn)
if old_key in dotfile and \
isinstance(dotfile[old_key], bool):
# patch link_children: <bool>
cur = dotfile[old_key]
@@ -1156,7 +1170,9 @@ class CfgYaml:
dotfile[self.key_dotfile_link] = new
self._dirty = True
self._dirty_deprecated = True
self._log.warn('deprecated \"link_children\" value')
warn = 'deprecated \"link_children\" value'
warn += ', updated to \"{}\"'.format(new)
self._log.warn(warn)
########################################################
# yaml utils