linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] scripts: sphinx-pre-install: remove unnecessary double check for $cur_version
@ 2024-08-27 13:32 Sebastian Muxel
  2024-09-05 20:32 ` Jonathan Corbet
  0 siblings, 1 reply; 2+ messages in thread
From: Sebastian Muxel @ 2024-08-27 13:32 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Jonathan Corbet, linux-doc, linux-kernel, Sebastian Muxel

$cur_version is currently being tested twice with the first test
resulting in an unhelpful "$sphinx returned an error", not continuing to
the more helpful "$sphinx didn't return its version".

This patch removes the first test to return the more useful message.

Fixes: a8b380c379ef ("scripts: sphinx-pre-install: only ask to activate valid venvs")
Signed-off-by: Sebastian Muxel <sebastian@muxel.dev>
---
 scripts/sphinx-pre-install | 2 --
 1 file changed, 2 deletions(-)

diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
index c1121f098542..ad9945ccb0cf 100755
--- a/scripts/sphinx-pre-install
+++ b/scripts/sphinx-pre-install
@@ -300,8 +300,6 @@ sub check_sphinx()
 	}
 
 	$cur_version = get_sphinx_version($sphinx);
-	die ("$sphinx returned an error") if (!$cur_version);
-
 	die "$sphinx didn't return its version" if (!$cur_version);
 
 	if ($cur_version lt $min_version) {
-- 
2.46.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts: sphinx-pre-install: remove unnecessary double check for $cur_version
  2024-08-27 13:32 [PATCH] scripts: sphinx-pre-install: remove unnecessary double check for $cur_version Sebastian Muxel
@ 2024-09-05 20:32 ` Jonathan Corbet
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Corbet @ 2024-09-05 20:32 UTC (permalink / raw)
  To: Sebastian Muxel, Mauro Carvalho Chehab
  Cc: linux-doc, linux-kernel, Sebastian Muxel

Sebastian Muxel <sebastian@muxel.dev> writes:

> $cur_version is currently being tested twice with the first test
> resulting in an unhelpful "$sphinx returned an error", not continuing to
> the more helpful "$sphinx didn't return its version".
>
> This patch removes the first test to return the more useful message.
>
> Fixes: a8b380c379ef ("scripts: sphinx-pre-install: only ask to activate valid venvs")
> Signed-off-by: Sebastian Muxel <sebastian@muxel.dev>
> ---
>  scripts/sphinx-pre-install | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index c1121f098542..ad9945ccb0cf 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -300,8 +300,6 @@ sub check_sphinx()
>  	}
>  
>  	$cur_version = get_sphinx_version($sphinx);
> -	die ("$sphinx returned an error") if (!$cur_version);
> -
>  	die "$sphinx didn't return its version" if (!$cur_version);

Applied, thanks.

jon

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-09-05 20:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-27 13:32 [PATCH] scripts: sphinx-pre-install: remove unnecessary double check for $cur_version Sebastian Muxel
2024-09-05 20:32 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).