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

Save LinkType enum in opts

This commit is contained in:
Marcel Robitaille
2019-01-27 12:58:20 -04:00
parent f8802ea1ac
commit 96870ac297
2 changed files with 4 additions and 8 deletions

View File

@@ -262,13 +262,9 @@ def cmd_importer(opts, conf, paths):
# create a new dotfile
dotfile = Dotfile('', dst, src)
linktype = LinkTypes.NOLINK
if opts['link_by_default']:
linktype = LinkTypes.PARENTS
elif opts['link_children']:
linktype = LinkTypes.CHILDREN
linktype = LinkTypes(opts['link'])
if opts['link'] and linktype == LinkTypes.PARENTS:
if opts['link_by_default'] and linktype == LinkTypes.PARENTS:
linktype = LinkTypes.NOLINK
else:
linktype = LinkTypes.PARENTS

View File

@@ -12,6 +12,7 @@ import tempfile
from dotdrop.config import Cfg
from dotdrop.utils import *
from dotdrop.linktypes import LinkTypes
TMPSUFFIX = '.dotdrop'
@@ -87,8 +88,7 @@ def load_config(confpath, profile):
opts['profile'] = profile
opts['safe'] = True
opts['installdiff'] = True
opts['link'] = False
opts['link_children'] = False
opts['link'] = LinkTypes.NOLINK.value
opts['showdiff'] = True
opts['debug'] = True
opts['dopts'] = ''