try to print error message

This commit is contained in:
Sina Atalay 2023-10-12 18:47:11 +02:00
parent b12dbf6d6b
commit 21c95ad0ea
1 changed files with 5 additions and 6 deletions

View File

@ -407,15 +407,14 @@ def run_latex(latex_file_path):
], ],
cwd=os.path.dirname(latex_file_path), cwd=os.path.dirname(latex_file_path),
check=True, 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: 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( raise RuntimeError(
f"Running TinyTeX has failed. Check the log file ({log_file_path}) for" "Running TinyTeX has failed with the following error: \n{e.output.decode()}"
" details. If you can't find the problem, please try to re-install" " \n\nIf you can't find the problem, please try to re-install RenderCV, or"
" RenderCV, or open an issue on GitHub." " open an issue on GitHub."
) )
# remove the unnecessary files: # remove the unnecessary files: