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) )