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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user