From 21c95ad0ea8a0cd8a59e8830f2cd906c76c82f0c Mon Sep 17 00:00:00 2001 From: Sina Atalay Date: Thu, 12 Oct 2023 18:47:11 +0200 Subject: [PATCH] try to print error message --- rendercv/rendering.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/rendercv/rendering.py b/rendercv/rendering.py index cb694f1..b43a0aa 100644 --- a/rendercv/rendering.py +++ b/rendercv/rendering.py @@ -407,15 +407,14 @@ def run_latex(latex_file_path): ], cwd=os.path.dirname(latex_file_path), check=True, - stdout=subprocess.DEVNULL, # suppress latexmk output + stdout=subprocess.STDOUT, # suppress latexmk output + stderr=subprocess.STDOUT, # suppress latexmk output ) except subprocess.CalledProcessError as e: - log_file_name = latex_file_name.replace(".tex", ".log") - log_file_path = os.path.join(os.path.dirname(latex_file_path), log_file_name) raise RuntimeError( - f"Running TinyTeX has failed. Check the log file ({log_file_path}) for" - " details. If you can't find the problem, please try to re-install" - " RenderCV, or open an issue on GitHub." + "Running TinyTeX has failed with the following error: \n{e.output.decode()}" + " \n\nIf you can't find the problem, please try to re-install RenderCV, or" + " open an issue on GitHub." ) # remove the unnecessary files: