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