double check if pdf is generated

This commit is contained in:
Sina Atalay 2023-10-13 22:41:54 +02:00
parent 18901990de
commit be686ebcfc
1 changed files with 8 additions and 0 deletions

View File

@ -420,6 +420,14 @@ def run_latex(latex_file_path: str) -> str:
" open an issue on GitHub." " open an issue on GitHub."
) )
# check if the PDF file is generated:
if not os.path.exists(output_file_path):
raise FileNotFoundError(
f"The PDF file {output_file_path} couldn't be generated! If you can't"
" solve the problem, please try to re-install RenderCV, or open an issue"
" on GitHub."
)
# remove the unnecessary files: # remove the unnecessary files:
for file_name in os.listdir(os.path.dirname(latex_file_path)): for file_name in os.listdir(os.path.dirname(latex_file_path)):
if ( if (