Skip to content

Commit

Permalink
yet another github action fix
Browse files Browse the repository at this point in the history
  • Loading branch information
cezary.maszczyk committed Nov 5, 2024
1 parent 487ea04 commit 5b21e43
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions docs/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
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,
stderr=subprocess.PIPE,
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)
)
Expand Down

0 comments on commit 5b21e43

Please sign in to comment.