From 8a0b1d2d9f9629e4a186549b134ebd6b80a5d71b Mon Sep 17 00:00:00 2001 From: David Luevano Alvarado Date: Sat, 23 Apr 2022 21:49:53 -0600 Subject: add proper var expansion from config file --- src/pyssg/pyssg.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/pyssg/pyssg.py') diff --git a/src/pyssg/pyssg.py b/src/pyssg/pyssg.py index 598bf41..eb042b6 100644 --- a/src/pyssg/pyssg.py +++ b/src/pyssg/pyssg.py @@ -5,7 +5,7 @@ from typing import Union from configparser import ConfigParser from logging import Logger, getLogger, DEBUG -from .utils import create_dir, copy_file, sanity_check_path +from .utils import create_dir, copy_file, get_expanded_path from .arg_parser import get_parsed_arguments from .configuration import get_parsed_config, DEFAULT_CONFIG_PATH, VERSION from .database import Database @@ -35,10 +35,8 @@ def main() -> None: log.info('pyssg v%s', VERSION) sys.exit(0) - log.debug('checking config file path') config_path: str = args['config'] if args['config'] else DEFAULT_CONFIG_PATH - config_path = os.path.normpath(os.path.expandvars(config_path)) - sanity_check_path(config_path) + config_path = get_expanded_path(config_path) config_dir, _ = os.path.split(config_path) log.debug('checked config file path, final config path "%s"', config_path) -- cgit v1.2.3-54-g00ecf