mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 17:39:50 +00:00
Delete bundle archive after extracting it
This commit is contained in:
@@ -4,6 +4,7 @@ import * as path from "path";
|
||||
import { performance } from "perf_hooks";
|
||||
|
||||
import * as toolcache from "@actions/tool-cache";
|
||||
import del from "del";
|
||||
import { default as deepEqual } from "fast-deep-equal";
|
||||
import * as semver from "semver";
|
||||
import { v4 as uuidV4 } from "uuid";
|
||||
@@ -569,10 +570,21 @@ export async function downloadCodeQL(
|
||||
performance.now() - toolsDownloadStart,
|
||||
);
|
||||
|
||||
logger.debug(`CodeQL bundle download to ${codeqlPath} complete.`);
|
||||
logger.debug(
|
||||
`Finished downloading CodeQL bundle to ${codeqlPath} (${toolsDownloadDurationMs} ms).`,
|
||||
);
|
||||
|
||||
const codeqlExtracted = await toolcache.extractTar(codeqlPath);
|
||||
|
||||
logger.debug(`Finished extracting CodeQL bundle to ${codeqlExtracted}.`);
|
||||
|
||||
try {
|
||||
await del(codeqlPath, { force: true });
|
||||
logger.debug("Deleted CodeQL bundle archive.");
|
||||
} catch (e) {
|
||||
logger.warning("Failed to delete CodeQL bundle archive.");
|
||||
}
|
||||
|
||||
const bundleVersion =
|
||||
maybeBundleVersion ?? tryGetBundleVersionFromUrl(codeqlURL, logger);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user