mirror of
https://github.com/rendercv/rendercv.git
synced 2026-10-24 21:28:47 -04:00
check if latex binary runs
This commit is contained in:
1 parent
4ec486ef6a
commit
06cf9d1198
1 file changed
+14
-8
+14
-8
@@ -392,14 +392,20 @@ def run_latex(latex_file_path):
|
||||
)
|
||||
executable = os.path.join(tinytex_path, "lualatex")
|
||||
|
||||
subprocess.run(
|
||||
[
|
||||
executable,
|
||||
f"{latex_file}",
|
||||
],
|
||||
cwd=os.path.dirname(latex_file_path),
|
||||
# stdout=subprocess.DEVNULL, # suppress latexmk output
|
||||
)
|
||||
try:
|
||||
subprocess.run(
|
||||
[
|
||||
executable,
|
||||
f"{latex_file}",
|
||||
],
|
||||
cwd=os.path.dirname(latex_file_path),
|
||||
check=True,
|
||||
# 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:
|
||||
for file in os.listdir(os.path.dirname(latex_file_path)):
|
||||
|
||||
Reference in new issue
Block a user