From da0e03a4dd95c74c93b6dcc510d66f261227852e Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Sun, 28 Apr 2024 19:21:56 +0300 Subject: [PATCH] renderer: use `pathlib.Path.cwd()` instead of `os.getcwd()` --- rendercv/renderer.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rendercv/renderer.py b/rendercv/renderer.py index 8f77122..d325cf0 100644 --- a/rendercv/renderer.py +++ b/rendercv/renderer.py @@ -733,7 +733,7 @@ def setup_jinja2_environment() -> jinja2.Environment: # we need to add the current working directory because custom themes might be used. themes_directory = pathlib.Path(__file__).parent / "themes" environment = jinja2.Environment( - loader=jinja2.FileSystemLoader([os.getcwd(), themes_directory]), + loader=jinja2.FileSystemLoader([pathlib.Path.cwd(), themes_directory]), trim_blocks=True, lstrip_blocks=True, ) @@ -846,7 +846,7 @@ def copy_theme_files_to_output_directory( else: # Then it means the theme is a custom theme. If theme_directory is not given # as an argument, then look for the theme in the current working directory. - theme_directory_path = pathlib.Path(os.getcwd()) / theme_name + theme_directory_path = pathlib.Path(pathlib.Path.cwd()) / theme_name if not theme_directory_path.is_dir(): raise FileNotFoundError(