1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 06:34:16 +00:00

install() to return single dotfile not flat list

This commit is contained in:
Marcel Robitaille
2019-01-25 16:27:02 -04:00
parent cd4f964875
commit eac9509c75
2 changed files with 1 additions and 9 deletions

View File

@@ -118,7 +118,6 @@ class Installer:
srcs = [os.path.join(parent, child) for child in children]
dsts = [os.path.join(dst, child) for child in children]
results = []
for i in range(len(children)):
src = srcs[i]
dst = dsts[i]
@@ -141,9 +140,7 @@ class Installer:
if len(result):
actions = []
results.append(result)
return utils.flatten(results)
return (src, dst)
def _link(self, src, dst, actions=[]):
"""set src as a link target of dst"""

View File

@@ -113,11 +113,6 @@ def strip_home(path):
return path
def flatten(a):
"""flatten list"""
return functools.reduce(operator.iconcat, a, [])
def must_ignore(paths, ignores, debug=False):
"""return true if any paths in list matches any ignore patterns"""
if not ignores: