Skip to content

Commit 68eb797

Browse files
committed
Skip waiting for SARIF if nothing was uploaded
1 parent 2765b8f commit 68eb797

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

‎lib/entry-points.js‎

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/upload-lib.ts‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -866,6 +866,16 @@ export async function waitForProcessing(
866866
): Promise<void> {
867867
logger.startGroup("Waiting for processing to finish");
868868
try {
869+
// If SARIF uplaod is disabled and we reach this point, then the file was written to disk and
870+
// there is nothing to wait for. We still allow ourselves to get to this point so that we can
871+
// see in the log that we would have waited for processing to finish if the upload had happened.
872+
if (util.shouldSkipSarifUpload()) {
873+
logger.info(
874+
"Nothing to wait for, because SARIF upload is disabled by an environment variable and the SARIF was saved to disk.",
875+
);
876+
return;
877+
}
878+
869879
const client = api.getApiClient();
870880

871881
// Do an initial wait because processing will always take a minimum of 2-3 seconds

0 commit comments

Comments
 (0)