Skip to content

Commit

Permalink
Config: Resolve filepath
Browse files Browse the repository at this point in the history
This maps the absolute path when loading the config file. Making
things safer when loading and finding the correct path.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Dec 24, 2023
1 parent 703a114 commit 060d422
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def read_config_from_file(config_path: pathlib.Path):
global GLOBAL_CONFIG

try:
with open(str(config_path), "r", encoding="utf8") as config_file:
with open(str(config_path.resolve()), "r", encoding="utf8") as config_file:
GLOBAL_CONFIG = unwrap(yaml.safe_load(config_file), {})
except Exception as exc:
logger.error(
Expand Down

0 comments on commit 060d422

Please sign in to comment.