Skip to content

Commit

Permalink
Merge pull request sphinx-doc#4067 from mitya57/stable
Browse files Browse the repository at this point in the history
Return non-zero exit status when make subprocess fails
  • Loading branch information
tk0miya authored Sep 24, 2017
2 parents cad3ee8 + 4475fc8 commit 7b0271a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions sphinx/make_mode.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

import os
import sys
import subprocess
from os import path

import sphinx
Expand Down Expand Up @@ -196,16 +197,14 @@ def build_latexpdf(self):
if self.run_generic_build('latex') > 0:
return 1
with cd(self.builddir_join('latex')):
os.system('%s all-pdf' % self.makecmd)
return 0
return subprocess.call([self.makecmd, 'all-pdf'])

def build_latexpdfja(self):
# type: () -> int
if self.run_generic_build('latex') > 0:
return 1
with cd(self.builddir_join('latex')):
os.system('%s all-pdf-ja' % self.makecmd)
return 0
return subprocess.call([self.makecmd, 'all-pdf-ja'])

def build_text(self):
# type: () -> int
Expand All @@ -231,8 +230,7 @@ def build_info(self):
if self.run_generic_build('texinfo') > 0:
return 1
with cd(self.builddir_join('texinfo')):
os.system('%s info' % self.makecmd)
return 0
return subprocess.call([self.makecmd, 'info'])

def build_gettext(self):
# type: () -> int
Expand Down

0 comments on commit 7b0271a

Please sign in to comment.