Stop the upload action early if no files will be uploaded.
This commit is contained in:
parent
b6a0306228
commit
4e9886ad2b
2 changed files with 2 additions and 0 deletions
1
lib/upload-lib.js
generated
1
lib/upload-lib.js
generated
|
|
@ -63,6 +63,7 @@ async function upload(input) {
|
||||||
.map(f => path.resolve(input, f));
|
.map(f => path.resolve(input, f));
|
||||||
if (sarifFiles.length === 0) {
|
if (sarifFiles.length === 0) {
|
||||||
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
|
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
await uploadFiles(sarifFiles);
|
await uploadFiles(sarifFiles);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,7 @@ export async function upload(input: string) {
|
||||||
.map(f => path.resolve(input, f));
|
.map(f => path.resolve(input, f));
|
||||||
if (sarifFiles.length === 0) {
|
if (sarifFiles.length === 0) {
|
||||||
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
|
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
await uploadFiles(sarifFiles);
|
await uploadFiles(sarifFiles);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue