From 7fe1e44fb792626c17f373d785d9ee0e49eb1eb6 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 2 Feb 2021 18:21:22 +0000 Subject: Fix an incorrect hyphen removal due to a double linefeed --- lib/Monitoring/Plugin/Functions.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/Monitoring') diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm index 3eaf9e3..cc938e5 100644 --- a/lib/Monitoring/Plugin/Functions.pm +++ b/lib/Monitoring/Plugin/Functions.pm @@ -119,7 +119,7 @@ sub plugin_exit { # Setup output my $output = "$STATUS_TEXT{$code}"; if (defined $message && $message ne '') { - $output .= " - " unless $message =~ /^\s*\n/mxs; + $output .= " - " unless $message =~ /^\s*[\n\r]/; $output .= $message; } my $shortname = ($arg->{plugin} ? $arg->{plugin}->shortname : undef); -- cgit v1.2.3-74-g34f1