Log malformed JSON received from nix-eval-jobs

This commit is contained in:
John Ericson 2025-02-11 22:18:53 -05:00
parent c52845f560
commit 1dbc7f5845

View File

@ -416,9 +416,16 @@ sub evalJobs {
}
if (defined $out && $out ne '') {
my $job = decode_json($out);
my $job;
try {
$job = decode_json($out);
} catch {
warn "nix-eval-jobs sent invalid JSON.\n parse error: $_\n invalid json: $out\n";
};
undef $out;
return $job;
if (defined $job) {
return $job;
}
}
}
};