diff --git a/dotdrop/options.py b/dotdrop/options.py index 93905e80..d0767e4a 100644 --- a/dotdrop/options.py +++ b/dotdrop/options.py @@ -148,10 +148,10 @@ def __init__(self, args=None): # args parsing self.args = {} - if not args: - self.args = docopt(USAGE, version=VERSION) if args: self.args = args.copy() + else: + self.args = docopt(USAGE, version=VERSION) if self.args['gencfg']: # print config and exit diff --git a/tests/test_options.py b/tests/test_options.py index 27d3fc25..874cb4a7 100644 --- a/tests/test_options.py +++ b/tests/test_options.py @@ -225,6 +225,7 @@ def test_options_debug(self, mock_exists): '--dry': False, '--cfg': 'path', '--profile': 'profile', + 'gencfg': False, } with self.assertRaises(YamlException): Options(args)