summaryrefslogtreecommitdiff
path: root/src/pyssg/pyssg.py
diff options
context:
space:
mode:
authorDavid Luevano Alvarado <david@luevano.xyz>2022-04-23 21:49:53 -0600
committerDavid Luevano Alvarado <david@luevano.xyz>2022-04-23 21:49:53 -0600
commit8a0b1d2d9f9629e4a186549b134ebd6b80a5d71b (patch)
tree287943581199328a91716faddaa14f7e4ad22088 /src/pyssg/pyssg.py
parentdfc3e6db921815416b8edc5892b2a7adfc677a25 (diff)
add proper var expansion from config filev0.7.1
Diffstat (limited to 'src/pyssg/pyssg.py')
-rw-r--r--src/pyssg/pyssg.py6
1 files changed, 2 insertions, 4 deletions
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)