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,11 +416,18 @@ sub evalJobs {
} }
if (defined $out && $out ne '') { 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; undef $out;
if (defined $job) {
return $job; return $job;
} }
} }
}
}; };
} }