From 631638398d58110efef3b98ead226635d7b68602 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 13 Feb 2025 12:56:57 +0100 Subject: [PATCH] Bug 39126: tidy - Show error if stderr_buf is empty If yarn is not installed: Tidying file 1/1 (koha-tmpl/intranet-tmpl/prog/fr-FR/modules/intranet-main.tt) Warning: something's wrong at misc/devel/tidy.pl line 79. There is the error hidden in $error_message open3: exec of yarn --silent run prettier --write koha-tmpl/intranet-tmpl/prog/fr-FR/modules/intranet-main.tt failed: No such file or directory Signed-off-by: Julian Maurice --- misc/devel/tidy.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/devel/tidy.pl b/misc/devel/tidy.pl index c3f22e635e..481d023c12 100755 --- a/misc/devel/tidy.pl +++ b/misc/devel/tidy.pl @@ -74,7 +74,7 @@ for my $index ( 0 .. $#files ) { my $error; my ( $success, $error_message, $full_buf, $stdout_buf, $stderr_buf ) = tidy($file); unless ($success) { - $error = join( '', @$stderr_buf ); + $error = join( '', @$stderr_buf ) || $error_message; chomp $error; warn $error; } -- 2.39.5