mirror of https://github.com/eyhc1/rendercv.git
check if latex binary runs
This commit is contained in:
parent
4ec486ef6a
commit
06cf9d1198
|
@ -392,14 +392,20 @@ def run_latex(latex_file_path):
|
||||||
)
|
)
|
||||||
executable = os.path.join(tinytex_path, "lualatex")
|
executable = os.path.join(tinytex_path, "lualatex")
|
||||||
|
|
||||||
|
try:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
[
|
[
|
||||||
executable,
|
executable,
|
||||||
f"{latex_file}",
|
f"{latex_file}",
|
||||||
],
|
],
|
||||||
cwd=os.path.dirname(latex_file_path),
|
cwd=os.path.dirname(latex_file_path),
|
||||||
|
check=True,
|
||||||
# stdout=subprocess.DEVNULL, # suppress latexmk output
|
# stdout=subprocess.DEVNULL, # suppress latexmk output
|
||||||
)
|
)
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
raise RuntimeError(
|
||||||
|
f"Running TinyTeX has failed with the following error:\n{e.stderr}"
|
||||||
|
)
|
||||||
|
|
||||||
# remove the unnecessary files:
|
# remove the unnecessary files:
|
||||||
for file in os.listdir(os.path.dirname(latex_file_path)):
|
for file in os.listdir(os.path.dirname(latex_file_path)):
|
||||||
|
|
Loading…
Reference in New Issue