diff options
-rwxr-xr-x | check_postgres.pl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/check_postgres.pl b/check_postgres.pl index 9a0746214..4fc3c0005 100755 --- a/check_postgres.pl +++ b/check_postgres.pl @@ -1271,6 +1271,10 @@ sub ndie { eval { File::Temp::cleanup(); }; my $msg = shift; chomp $msg; + ## If this message already starts with an ERROR, filter that out for prettiness + $msg =~ s/^\s*ERROR:\s*/ /; + ## Trim whitespace + $msg =~ s/^\s*(.+)\s*$/$1/; print "ERROR: $msg\n"; exit 3; } |