From 7e42ccbee5e5083b555dd75178dec864ead492b4 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 27 Dec 2018 15:31:00 +0100 Subject: [PATCH] fix bug when importing with the -l flag --- dotdrop/config.py | 3 ++- dotdrop/dotdrop.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/dotdrop/config.py b/dotdrop/config.py index b7ee575..85c1510 100644 --- a/dotdrop/config.py +++ b/dotdrop/config.py @@ -540,7 +540,7 @@ class Cfg: if exists: if debug: self.log.dbg('key already exists: {}'.format(key)) - # when dotfile already there somewhere + # retrieve existing dotfile dotfile = self.dotfiles[key] if dotfile in self.prodots[profile]: self.log.err('\"{}\" already present'.format(dotfile.key)) @@ -560,6 +560,7 @@ class Cfg: self.log.dbg('dotfile attributed key: {}'.format(key)) # adding the new dotfile dotfile.key = key + dotfile.link = link if debug: self.log.dbg('adding new dotfile: {}'.format(dotfile)) # add the entry in the yaml file diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index 055dd4f..eb6615f 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -282,7 +282,7 @@ def cmd_importer(opts, conf, paths): remove(dst) os.symlink(srcf, dst) retconf, dotfile = conf.new(dotfile, opts['profile'], - linkit, debug=opts['debug']) + link=linkit, debug=opts['debug']) if retconf: LOG.sub('\"{}\" imported'.format(path)) cnt += 1