Skip to content

Commit

Permalink
Merge pull request #1438 from NixOS/log-malformed-json
Browse files Browse the repository at this point in the history
Log malformed JSON received from `nix-eval-jobs`
  • Loading branch information
Mic92 authored Feb 12, 2025
2 parents c52845f + 1dbc7f5 commit c6f9820
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/script/hydra-eval-jobset
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
};
Expand Down

0 comments on commit c6f9820

Please sign in to comment.