mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Re-throw errors
This commit is contained in:
3
lib/upload-lib.js
generated
3
lib/upload-lib.js
generated
@@ -102,6 +102,9 @@ async function uploadPayload(payload, repositoryNwo, githubAuth, githubApiUrl, m
|
||||
// Returns true iff the upload occurred and succeeded
|
||||
async function upload(sarifPath, repositoryNwo, commitOid, ref, analysisKey, analysisName, workflowRunID, checkoutPath, environment, githubAuth, githubApiUrl, mode, logger) {
|
||||
const sarifFiles = [];
|
||||
if (!fs.existsSync(sarifPath)) {
|
||||
throw new Error(`Path does not exist: ${sarifPath}`);
|
||||
}
|
||||
if (fs.lstatSync(sarifPath).isDirectory()) {
|
||||
fs.readdirSync(sarifPath)
|
||||
.filter(f => f.endsWith(".sarif"))
|
||||
|
||||
Reference in New Issue
Block a user