mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-09 07:44:16 +00:00
fix empty profile or empty profile dotfiles for #221
This commit is contained in:
@@ -398,6 +398,9 @@ class CfgYaml:
|
|||||||
return profiles
|
return profiles
|
||||||
new = {}
|
new = {}
|
||||||
for k, v in profiles.items():
|
for k, v in profiles.items():
|
||||||
|
if not v:
|
||||||
|
# no dotfiles
|
||||||
|
continue
|
||||||
# add dotfiles entry if not present
|
# add dotfiles entry if not present
|
||||||
if self.key_profile_dotfiles not in v:
|
if self.key_profile_dotfiles not in v:
|
||||||
v[self.key_profile_dotfiles] = []
|
v[self.key_profile_dotfiles] = []
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ def cmd_install(o):
|
|||||||
def cmd_compare(o, tmp):
|
def cmd_compare(o, tmp):
|
||||||
"""compare dotfiles and return True if all identical"""
|
"""compare dotfiles and return True if all identical"""
|
||||||
dotfiles = o.dotfiles
|
dotfiles = o.dotfiles
|
||||||
if dotfiles == []:
|
if not dotfiles:
|
||||||
msg = 'no dotfile defined for this profile (\"{}\")'
|
msg = 'no dotfile defined for this profile (\"{}\")'
|
||||||
LOG.warn(msg.format(o.profile))
|
LOG.warn(msg.format(o.profile))
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user