diff options
author | Jon Bernard <jbernard@tuxion.com> | 2015-12-25 06:36:33 -0500 |
---|---|---|
committer | Jon Bernard <jbernard@tuxion.com> | 2015-12-28 14:15:15 -0500 |
commit | c8c4b42b009897c31310960984819ca7a95a2429 (patch) | |
tree | f5d6eaa0bea989df944ec41a0cf7cf9074a0188c | |
parent | 6bfa15e3f66b62b0de0c09f701a8709e1f74c4a7 (diff) | |
download | dotfiles-c8c4b42b009897c31310960984819ca7a95a2429.tar.gz dotfiles-c8c4b42b009897c31310960984819ca7a95a2429.tar.bz2 dotfiles-c8c4b42b009897c31310960984819ca7a95a2429.zip |
Expand configuration file path early
-rw-r--r-- | dotfiles/cli.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/dotfiles/cli.py b/dotfiles/cli.py index 1ea86bf..19bf234 100644 --- a/dotfiles/cli.py +++ b/dotfiles/cli.py @@ -149,7 +149,7 @@ def parse_args(): def parse_config(config_file): parser = configparser.SafeConfigParser() - parser.read(os.path.expanduser(config_file)) + parser.read(config_file) opts = dict() @@ -222,7 +222,8 @@ def main(): repo_settings['homedir'] = realpath_expanduser( cli_opts.homedir or repo_settings['homedir']) - config_opts = parse_config(cli_opts.config_file or '~/%s' % CONFIG_FILE) + config_opts = parse_config(cli_opts.config_file or + realpath_expanduser('~/%s' % CONFIG_FILE)) repo_settings['path'] = realpath_expanduser( cli_opts.repository or |