diff lib/Test/Nginx.pm @ 1963:5656138f2e46

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Sun, 05 May 2024 23:56:16 +0300
parents 1d980c5013dc
children 6d3a8f4eb9b2
line wrap: on
line diff
--- 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;
 }