mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix sphinx-build: `sphinx.cmd.build.main()
refers
sys.argv
` instead of given argument
This commit is contained in:
2
CHANGES
2
CHANGES
@@ -34,6 +34,8 @@ Bugs fixed
|
||||
* #5070: epub: Wrong internal href fragment links
|
||||
* #5104: apidoc: Interface of ``sphinx.apidoc:main()`` has changed
|
||||
* #5125: sphinx-build: Interface of ``sphinx:main()`` has changed
|
||||
* sphinx-build: ``sphinx.cmd.build.main()`` refers ``sys.argv`` instead of given
|
||||
argument
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
@@ -32,7 +32,7 @@ def make_main(argv=sys.argv[1:]):
|
||||
|
||||
def main(argv=sys.argv[1:]):
|
||||
# type: (List[str]) -> int
|
||||
if sys.argv[1:2] == ['-M']:
|
||||
if argv[:1] == ['-M']:
|
||||
return make_main(argv)
|
||||
else:
|
||||
return build_main(argv)
|
||||
|
Reference in New Issue
Block a user