fix(documentation): exit with error code if PDF generation fails

This commit is contained in:
Uri Shaked
2024-05-29 17:02:39 +03:00
parent 17e08942b2
commit 11b2d371b4
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -159,7 +159,8 @@ class Docs:
logging.info(pdf_cmd) logging.info(pdf_cmd)
p = subprocess.run(pdf_cmd, shell=True) p = subprocess.run(pdf_cmd, shell=True)
if p.returncode != 0: if p.returncode != 0:
logging.error("pdf command failed") logging.error("pdf generation failed")
raise RuntimeError(f"pdf generation failed with code {p.returncode}")
def build_hugo_content(self, hugo_root: str) -> None: def build_hugo_content(self, hugo_root: str) -> None:
hugo_images = os.path.join(hugo_root, "images") hugo_images = os.path.join(hugo_root, "images")
+2 -1
View File
@@ -640,7 +640,8 @@ class Project:
logging.info(pdf_cmd) logging.info(pdf_cmd)
p = subprocess.run(pdf_cmd, shell=True) p = subprocess.run(pdf_cmd, shell=True)
if p.returncode != 0: if p.returncode != 0:
logging.error("pdf command failed") logging.error("pdf generation failed")
raise RuntimeError(f"pdf generation failed with code {p.returncode}")
# Read and return top-level GDS data from the final GDS file, using gdstk: # Read and return top-level GDS data from the final GDS file, using gdstk:
def get_final_gds_top_cells(self): def get_final_gds_top_cells(self):