Public Access
Do not fail check if no critical vulnerabilities were found when executed for a fork repository (closes #104)
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@ async function getData(): Promise<interfaces.Report> {
|
||||
await cargo.call(['audit', '--json'], {
|
||||
ignoreReturnCode: true,
|
||||
listeners: {
|
||||
stdout: buffer => {
|
||||
stdout: (buffer) => {
|
||||
stdout += buffer.toString();
|
||||
},
|
||||
},
|
||||
|
||||
@@ -153,6 +153,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
|
||||
throw new Error(
|
||||
'Critical vulnerabilities were found, marking check as failed',
|
||||
);
|
||||
} else {
|
||||
core.info(
|
||||
'No critical vulnerabilities were found, not marking check as failed',
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -177,6 +182,11 @@ See https://github.com/actions-rs/clippy-check/issues/2 for details.`);
|
||||
throw new Error(
|
||||
'Critical vulnerabilities were found, marking check as failed',
|
||||
);
|
||||
} else {
|
||||
core.info(
|
||||
'No critical vulnerabilities were found, not marking check as failed',
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user