From 5b21e437d1e96e33dca13c8ec7dc84c7de1449f3 Mon Sep 17 00:00:00 2001 From: "cezary.maszczyk" Date: Tue, 5 Nov 2024 15:13:09 +0100 Subject: [PATCH] yet another github action fix --- docs/build.py | 3 ++- docs/helpers.py | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/build.py b/docs/build.py index 1da374c..aa9bd0a 100644 --- a/docs/build.py +++ b/docs/build.py @@ -15,7 +15,8 @@ def build_docs_using_sphinx(version_number: str): run_command([ sys.executable, '-m', 'sphinx.cmd.build', '-M', 'html', 'source', output_path, ], - cwd=curr_dir_path + cwd=curr_dir_path, + raise_on_error=False ) tmp_path: str = f'{output_path}@' shutil.move(output_path, tmp_path) diff --git a/docs/helpers.py b/docs/helpers.py index f4615b4..d8cf20d 100644 --- a/docs/helpers.py +++ b/docs/helpers.py @@ -2,7 +2,7 @@ from typing import Optional -def run_command(command: list[str], cwd: Optional[str] = None): +def run_command(command: list[str], cwd: Optional[str] = None, raise_on_error: bool = True): process = subprocess.Popen( command, stdout=subprocess.PIPE, @@ -10,7 +10,7 @@ def run_command(command: list[str], cwd: Optional[str] = None): cwd=cwd ) output, error = process.communicate() - if process.returncode != 0: + if process.returncode != 0 and raise_on_error: raise Exception("File handling failed %d %s %s" % (process.returncode, output, error) )