The Wayback Machine - http://web.archive.org/web/20240323000752/https://github.com/github/codeql-action/issues/282
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not crash with empty folder #282

Open

prabhu opened this issue Oct 29, 2020 · 1 comment
Open

Do not crash with empty folder #282

prabhu opened this issue Oct 29, 2020 · 1 comment

Comments

@prabhu
Copy link

prabhu commented Oct 29, 2020

Scan uses upload-sarif step with a directory called reports. If this directory happens to be empty (no results produced), then the upload step is failing as below:

Error: No SARIF files found to upload in "reports".
Error: No SARIF files found to upload in "reports".
    at Object.upload (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-lib.js:82:19)
    at run (/home/runner/work/_actions/github/codeql-action/v1/lib/upload-sarif-action.js:29:46)

This is breaking quite a large number of builds. Is it possible to detect empty directories and prevent this step from failing with error? It is going to take some effort to make scan produce empty sarif file for various cases so would appreciate this workaround from you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@prabhu and others