diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index 52ea58d..4a7ea1d 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -47,8 +47,9 @@ def cmd_install(o): inst = Installer(create=o.create, backup=o.backup, dry=o.dry, safe=o.safe, base=o.dotpath, workdir=o.workdir, - diff=o.installdiff, debug=o.debug, - totemp=tmpdir, showdiff=o.showdiff) + diff=o.install_diff, debug=o.debug, + totemp=tmpdir, + showdiff=o.install_showdiff) installed = [] for dotfile in dotfiles: preactions = [] diff --git a/dotdrop/options.py b/dotdrop/options.py index 5be5534..e22a379 100644 --- a/dotdrop/options.py +++ b/dotdrop/options.py @@ -32,13 +32,13 @@ USAGE = """ {} Usage: - dotdrop install [-tfndVbD] [-c ] [-p ] [...] - dotdrop import [-ldVb] [-c ] [-p ] ... + dotdrop install [-VbtfndD] [-c ] [-p ] [...] + dotdrop import [-Vbld] [-c ] [-p ] ... dotdrop compare [-Vb] [-c ] [-p ] [-o ] [-C ...] [-i ...] - dotdrop update [-fdVbkP] [-c ] [-p ] + dotdrop update [-VbfdkP] [-c ] [-p ] [-i ...] [...] - dotdrop listfiles [-VTb] [-c ] [-p ] + dotdrop listfiles [-VbT] [-c ] [-p ] dotdrop detail [-Vb] [-c ] [-p ] [...] dotdrop list [-Vb] [-c ] dotdrop --help @@ -71,7 +71,7 @@ class Options: def __init__(self, args=None): """constructor - @args: argument dictionary (if non use sys) + @args: argument dictionary (if None use sys) """ self.args = args if not args: @@ -117,8 +117,6 @@ class Options: self.dry = self.args['--dry'] self.profile = self.args['--profile'] self.safe = not self.args['--force'] - self.installdiff = not self.args['--nodiff'] - self.showdiff = self.showdiff or self.args['--showdiff'] self.link = LinkTypes.NOLINK if self.link_by_default: self.link = LinkTypes.PARENTS @@ -135,6 +133,8 @@ class Options: # "install" specifics self.install_temporary = self.args['--temp'] self.install_keys = self.args[''] + self.install_diff = not self.args['--nodiff'] + self.install_showdiff = self.showdiff or self.args['--showdiff'] # "compare" specifics self.compare_dopts = self.args['--dopts'] self.compare_focus = self.args['--file'] diff --git a/tests/helpers.py b/tests/helpers.py index aadf9b8..84649a5 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -124,9 +124,9 @@ def load_options(confpath, profile): o.dry = False o.profile = profile o.safe = True - o.installdiff = True + o.install_diff = True o.link = LinkTypes.NOLINK.value - o.showdiff = True + o.install_showdiff = True o.debug = True o.dopts = '' o.variables = {} diff --git a/tests/test_install.py b/tests/test_install.py index b107448..158e413 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -184,7 +184,7 @@ exec bspwm o = load_options(confpath, profile) o.safe = False o.debug = True - o.showdiff = True + o.install_showdiff = True o.variables = {} cmd_install(o) diff --git a/tests/test_update.py b/tests/test_update.py index 9701eb5..e77d7ba 100644 --- a/tests/test_update.py +++ b/tests/test_update.py @@ -68,6 +68,7 @@ class TestUpdate(unittest.TestCase): create=self.CONFIG_CREATE) self.assertTrue(os.path.exists(confpath)) o = load_options(confpath, profile) + o.debug = True dfiles = [d1, dir1, d2] # import the files