# HG changeset patch # User Sergey Kandaurov # Date 1522063677 -10800 # Node ID 58fdd9515f81b2bf8220c18815a920638951fef6 # Parent 23026106e4397d691d54b75101b3e7c8a7736273 Tests: fixed printing try_run() diagnostics. Previously, error log path could point to junk on unsuccessful regex match. diff -r 23026106e439 -r 58fdd9515f81 lib/Test/Nginx.pm --- a/lib/Test/Nginx.pm Thu Mar 22 14:18:33 2018 +0300 +++ b/lib/Test/Nginx.pm Mon Mar 26 14:27:57 2018 +0300 @@ -291,8 +291,8 @@ return $self unless $@; if ($ENV{TEST_NGINX_VERBOSE}) { - $self->{_configure_args} =~ m!--error-log-path=(\S+)!; - my $path = $1 || 'logs/error.log'; + my $path = $self->{_configure_args} =~ m!--error-log-path=(\S+)! + ? $1 : 'logs/error.log'; $path = "$self->{_testdir}/$path" if index($path, '/'); open F, '<', $path or die "Can't open $path: $!";