Skip to content

Commit ada0133

Browse files
committed
Ignore return code from latex build
1 parent d47cb3d commit ada0133

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

readthedocs/doc_builder/backends/sphinx.py

+12-3
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,15 @@ def _build_latexmk(self, cwd, latex_cwd):
467467
cwd=latex_cwd,
468468
)
469469

470-
cmd = self.run(
470+
if self.build_env.command_class == DockerBuildCommand:
471+
latex_class = DockerLatexBuildCommand
472+
else:
473+
latex_class = LatexBuildCommand
474+
475+
cmd = [
471476
'latexmk',
472477
'-r',
473478
rcfile,
474-
475479
# FIXME: check for platex here as well
476480
'-pdfdvi' if self.project.language == 'ja' else '-pdf',
477481
# Ignore error codes because they often lie
@@ -480,13 +484,18 @@ def _build_latexmk(self, cwd, latex_cwd):
480484
'-ps-',
481485
f'-jobname={self.project.slug}',
482486
'-interaction=nonstopmode',
487+
]
488+
489+
cmd_ret = self.build_env.run_command_class(
490+
cls=latex_class,
491+
cmd=cmd,
483492
warn_only=True,
484493
cwd=latex_cwd,
485494
)
486495

487496
self.pdf_file_name = f'{self.project.slug}.pdf'
488497

489-
return cmd.successful
498+
return cmd_ret.successful
490499

491500
def _build_pdflatex(self, tex_files, latex_cwd):
492501
pdflatex_cmds = [

0 commit comments

Comments
 (0)