1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-09 08:19:17 +00:00

keep order of included profiles for #149

This commit is contained in:
deadc0de6
2019-06-02 13:31:36 +02:00
parent 8af57adfab
commit bebe6f5eae
5 changed files with 162 additions and 6 deletions

View File

@@ -14,7 +14,7 @@ from dotdrop.settings import Settings
from dotdrop.logger import Logger
from dotdrop.templategen import Templategen
from dotdrop.linktypes import LinkTypes
from dotdrop.utils import shell
from dotdrop.utils import shell, uniq_list
class CfgYaml:
@@ -490,7 +490,10 @@ class CfgYaml:
others.extend(self._rec_resolve_profile_include(i))
current.extend(others)
# unique them
values[self.key_profiles_dotfiles] = list(set(current))
values[self.key_profiles_dotfiles] = uniq_list(current)
if self.debug:
dfs = values[self.key_profiles_dotfiles]
self.log.dbg('profile dfs after include: {}'.format(dfs))
return values.get(self.key_profiles_dotfiles, [])
def _resolve_path(self, path):