Stop the upload action early if no files will be uploaded.

This commit is contained in:
Chris Gavin 2020-05-01 15:27:32 +01:00
parent b6a0306228
commit 4e9886ad2b
No known key found for this signature in database
GPG key ID: 07F950B80C27E4DA
2 changed files with 2 additions and 0 deletions

1
lib/upload-lib.js generated
View file

@ -63,6 +63,7 @@ async function upload(input) {
.map(f => path.resolve(input, f));
if (sarifFiles.length === 0) {
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
return;
}
await uploadFiles(sarifFiles);
}

View file

@ -56,6 +56,7 @@ export async function upload(input: string) {
.map(f => path.resolve(input, f));
if (sarifFiles.length === 0) {
core.setFailed("No SARIF files found to upload in \"" + input + "\".");
return;
}
await uploadFiles(sarifFiles);
} else {