From ffdbe46a5c5f03a8d62bddd566eff5b5bf101bd0 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 --- 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 c3f22e635ea..481d023c129 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.34.1