enh(sccm): sites-status mode - better encoding management (#3074)

This commit is contained in:
qgarnier 2021-09-02 10:24:45 +02:00 committed by GitHub
parent 5b60960edb
commit a8edee352b
1 changed files with 2 additions and 2 deletions

View File

@ -158,10 +158,10 @@ sub manage_selection {
$self->{output}->display(nolabel => 1, force_ignore_perfdata => 1, force_long_output => 1);
$self->{output}->exit();
}
my $decoded;
eval {
$decoded = JSON::XS->new->utf8->decode($stdout);
$decoded = JSON::XS->new->decode($self->{output}->decode($stdout));
};
if ($@) {
$self->{output}->add_option_msg(short_msg => "Cannot decode json response: $@");