1
0
Fork 0
mirror of synced 2024-06-03 07:51:09 -04:00
This commit is contained in:
ael 2016-11-19 16:01:04 +00:00 committed by GitHub
commit 5efe0cabf7

View file

@ -1,4 +1,7 @@
import os, shutil, dotbot
import os
import shutil
import dotbot
class Link(dotbot.Plugin):
'''
@ -34,10 +37,14 @@ class Link(dotbot.Plugin):
else:
path = source
path = os.path.expandvars(os.path.expanduser(path))
if not self._exists(path):
success = False
self._log.warning('Skipping nonexistent target "%s" -> "%s"' %
(destination, path))
continue
if create:
success &= self._create(destination)
if force or relink:
if self._exists(path):
success &= self._delete(path, destination, relative, force)
success &= self._link(path, destination, relative)
if success: