Skip to content

Commit 90d97f6

Browse files
committed
Fail hard if a statusReport is undefined
1 parent 0d17ea4 commit 90d97f6

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

lib/status-report.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/status-report.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/status-report.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,11 @@ const INCOMPATIBLE_MSG =
392392
export async function sendStatusReport<S extends StatusReportBase>(
393393
statusReport: S,
394394
): Promise<void> {
395+
if (statusReport === undefined) {
396+
core.setFailed("Status report is undefined, this should not be happening");
397+
return;
398+
}
399+
395400
setJobStatusIfUnsuccessful(statusReport.status);
396401

397402
const statusReportJSON = JSON.stringify(statusReport);

0 commit comments

Comments
 (0)