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

adding showdiff for symlink for #156

This commit is contained in:
deadc0de6
2019-06-10 21:02:12 +02:00
parent 7bd5d7fd45
commit 9519d3e990

View File

@@ -216,6 +216,10 @@ class Installer:
if self.dry:
self.log.dry('would remove {} and link to {}'.format(dst, src))
return True, None
if self.showdiff:
with open(src, 'rb') as f:
content = f.read()
self._diff_before_write(src, dst, content)
msg = 'Remove "{}" for link creation?'.format(dst)
if self.safe and not self.log.ask(msg):
err = 'ignoring "{}", link was not created'.format(dst)