diff --git a/sphinx_multiversion/main.py b/sphinx_multiversion/main.py index fb847142..5e960826 100644 --- a/sphinx_multiversion/main.py +++ b/sphinx_multiversion/main.py @@ -232,8 +232,7 @@ def main(argv=None): ] ) logger.debug("Running sphinx-build with args: %r", current_argv) - status = sphinx_build.build_main(current_argv) - if status not in (0, None): - return 3 + cmd = (sys.executable, "-m", "sphinx", *current_argv) + subprocess.check_call(cmd) return 0