mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-10-20 17:49:56 +00:00
Change JSONReportFormatter to handle versions of JSON.pm that don't add a newline at the end of the encoded json
This commit is contained in:
@@ -103,7 +103,9 @@ override query_report => sub {
|
||||
};
|
||||
}
|
||||
|
||||
return $self->encode_json(\@queries) . "\n";
|
||||
my $json = $self->encode_json(\@queries);
|
||||
$json .= "\n" if $json !~ /\n\Z/;
|
||||
return $json . "\n";
|
||||
};
|
||||
|
||||
1;
|
||||
|
Reference in New Issue
Block a user