mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 11:49:14 +00:00
adding showdiff for symlink for #156
This commit is contained in:
@@ -216,6 +216,10 @@ class Installer:
|
|||||||
if self.dry:
|
if self.dry:
|
||||||
self.log.dry('would remove {} and link to {}'.format(dst, src))
|
self.log.dry('would remove {} and link to {}'.format(dst, src))
|
||||||
return True, None
|
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)
|
msg = 'Remove "{}" for link creation?'.format(dst)
|
||||||
if self.safe and not self.log.ask(msg):
|
if self.safe and not self.log.ask(msg):
|
||||||
err = 'ignoring "{}", link was not created'.format(dst)
|
err = 'ignoring "{}", link was not created'.format(dst)
|
||||||
|
|||||||
Reference in New Issue
Block a user