From e38b491771bfb682a12df2cb63b28fac80529639 Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Mon, 9 Dec 2024 03:27:51 -0500 Subject: [PATCH] cli: fix more path issues --- rendercv/data/models/design.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rendercv/data/models/design.py b/rendercv/data/models/design.py index 7fee8512..d4e8119d 100644 --- a/rendercv/data/models/design.py +++ b/rendercv/data/models/design.py @@ -51,7 +51,6 @@ def validate_design_options( original_working_directory = pathlib.Path.cwd() # Change the working directory to the input file directory: - os.chdir(INPUT_FILE_DIRECTORY) if isinstance(design, tuple(available_theme_options.values())): # Then it means it is an already validated built-in theme. Return it as it is: @@ -60,7 +59,6 @@ def validate_design_options( # Then it is a built-in theme, but it is not validated yet. Validate it and # return it: ThemeDataModel = available_theme_options[design["theme"]] - os.chdir(original_working_directory) return ThemeDataModel(**design) # It is a custom theme. Validate it: theme_name: str = str(design["theme"]) @@ -74,7 +72,7 @@ def validate_design_options( theme_name, # this is value of the error ) - custom_theme_folder = pathlib.Path(theme_name) + custom_theme_folder = INPUT_FILE_DIRECTORY / theme_name # Check if the custom theme folder exists: if not custom_theme_folder.exists():