details:   http://freenginx.org/hg/nginx-tests/rev/5656138f2e46
branches:  
changeset: 1963:5656138f2e46
user:      Maxim Dounin <mdou...@mdounin.ru>
date:      Sun May 05 23:56:16 2024 +0300
description:
Tests: improved has_daemon() to drop "which" stderr.

On some platforms (notably OpenBSD) "which" prints an error if the command
is not found.  It is now dropped to produce less clutter during testing.

diffstat:

 lib/Test/Nginx.pm |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff --git a/lib/Test/Nginx.pm b/lib/Test/Nginx.pm
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -336,7 +336,7 @@ sub has_daemon($) {
        }
 
        Test::More::plan(skip_all => "$daemon not found")
-               unless `which $daemon`;
+               unless `which $daemon 2>/dev/null`;
 
        return $self;
 }
-- 
nginx-devel mailing list
nginx-devel@freenginx.org
https://freenginx.org/mailman/listinfo/nginx-devel

Reply via email to