Skip to content

Commit 5b62f75

Browse files
committed
Propagate the Saxon return code to the shell
1 parent 564297b commit 5b62f75

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/bin/docbook.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,7 @@ def run(self):
579579
if self.catalogs:
580580
args.append("-catalog:" + ";".join(self.catalogs))
581581

582+
rc = 0
582583
jopt = self.config.get("java-options", [])
583584
if self.debug:
584585
print(self._java)
@@ -592,7 +593,9 @@ def run(self):
592593
print(f"\t{item}")
593594
else:
594595
cmd = [self._java] + jopt + ["-cp", cp] + [self.config["class"]] + args
595-
subprocess.call(cmd)
596+
rc = subprocess.call(cmd)
597+
598+
return rc
596599

597600

598601
if __name__ == "__main__":
@@ -602,7 +605,7 @@ def run(self):
602605
try:
603606
docbook = JavaClassRunner(sys.argv[1:])
604607
docbook.compute_dependencies()
605-
docbook.run()
608+
sys.exit(docbook.run())
606609
except JavaClassRunnerException as err:
607610
print(str(err))
608611
sys.exit(1)

0 commit comments

Comments
 (0)