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

Sphinx should exit with non zero exit code on error #508

Closed
shimizukawa opened this issue Jan 2, 2015 · 4 comments
Closed

Sphinx should exit with non zero exit code on error #508

shimizukawa opened this issue Jan 2, 2015 · 4 comments

Comments

@shimizukawa
Copy link
Member

When Sphinx encounters an error, it currently exits with a exit code of zero. That doesn't work well with makefile and buildbots etc. We had several issues with silently failing doc builds.


@shimizukawa
Copy link
Member Author

From Georg Brandl on 2010-08-23 13:29:11+00:00

In case of an error, Sphinx already exits with nonzero exit code. However, non-severe docutils errors are not considered errors and made warnings instead.

If you like warnings to be errors, use the -W option to sphinx-build.

@shimizukawa
Copy link
Member Author

From Kostis Anagnostopoulos on 2014-08-23 04:27:19+00:00

This bug is still there for builders invoked through the setup.py command!

For instance, the doctest builder:

  • When run with sphinx-build -b doctest, the process exits with error-code 1, as it should.
  • But when i run python setup.py build_sphinx -b doctest the error-code is 0.

It seems the sphinx/setup_command.py:BuildDoc.run() is missing a final clause to check status-code of the selected builder.

My sphinx version:

#!bash

$ pip show sphinx
---
Name: Sphinx
Version: 1.2.2

@shimizukawa
Copy link
Member Author

From Takayuki Shimizukawa on 2014-08-28 16:16:15+00:00

Now Sphinx exits with non-zero status code if builder status is not success. Closes #508.

→ <>

@shimizukawa
Copy link
Member Author

From Georg Brandl on 2014-10-18 07:29:51+00:00

Removing version: 1.0.2 (automated comment)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant