From c8c4b42b009897c31310960984819ca7a95a2429 Mon Sep 17 00:00:00 2001 From: Jon Bernard Date: Fri, 25 Dec 2015 06:36:33 -0500 Subject: Expand configuration file path early --- dotfiles/cli.py | 5 +++-- 1 file 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 -- cgit v1.2.3