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