Skip to content

make.bat template jumps to help block without first checking if sphinx is installed #10122

@AhiyaHiya

Description

@AhiyaHiya

Describe the bug

If you were to invoke make.bat, before installing sphinx, you would get the following error:

'sphinx-build' is not recognized as an internal or external command,
operable program or batch file.

The reason why the above error is emitted and not the echo.The 'sphinx-build' command was not found. Make sure you have Sphinx[...] message is because if "%1" == "" goto help is called before checking if the app is installed.

This error is at line 13, in file sphinx/sphinx/templates/quickstart/make.bat.new_t.

Line 13 should be moved to after the app check, if errorlevel 9009 ([...]).

How to Reproduce

As an end user, I receive a folder with sphinx generated files, e.g. make.bat, conf.py, Makefile, and attempt to run make by calling make.bat

Expected behavior

Error message stating that I should install sphinx

Your project

NA

Screenshots

No response

OS

Win

Python version

3.8.7

Sphinx version

NA

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions