Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve handling for errors in pre-build commands #181

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion sphinx_autobuild/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import contextlib
import subprocess
import sys
import traceback
from collections.abc import Sequence
from pathlib import Path

Expand Down Expand Up @@ -45,7 +46,14 @@ def __call__(self, *, changed_paths: Sequence[Path]):
"Please fix the cause of the error above or press Ctrl+C to stop the "
"server."
)
raise
print(
"The server will continue serving the build folder, but the contents "
"being served are no longer in sync with the documentation sources. "
"Please fix the cause of the error above or press Ctrl+C to stop the "
"server."
)
traceback.print_exception(e)
return

if sphinx.version_info[:3] >= (7, 2, 3):
sphinx_build_args = ["-m", "sphinx", "build"] + self.sphinx_args
Expand Down