diff options
Diffstat (limited to 'scripts/sphinx-pre-install')
-rwxr-xr-x | scripts/sphinx-pre-install | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install index cfb82c548fb3..2ef2c561fdc6 100755 --- a/scripts/sphinx-pre-install +++ b/scripts/sphinx-pre-install @@ -785,12 +785,13 @@ sub recommend_sphinx_version($) { my $virtualenv_cmd = shift; - if ($latest_avail_ver lt $min_pdf_version) { - print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n"; - } - # Version is OK. Nothing to do. - return if ($cur_version && ($cur_version ge $rec_version)); + if ($cur_version && ($cur_version ge $rec_version)) { + if ($cur_version lt $min_pdf_version) { + print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n"; + } + return; + }; if (!$need_sphinx) { # sphinx-build is present and its version is >= $min_version @@ -837,6 +838,10 @@ sub recommend_sphinx_version($) printf "\t. $activate_cmd\n"; deactivate_help(); + if ($latest_avail_ver lt $min_pdf_version) { + print "note: If you want pdf, you need at least Sphinx $min_pdf_version.\n"; + } + return; } |