mirror of
https://github.com/github/codeql-action.git
synced 2026-05-08 06:40:19 +00:00
Experiment with asking tar to figure out the decompression method
This commit is contained in:
Generated
+7
-1
@@ -404,7 +404,7 @@ const downloadCodeQL = async function (codeqlURL, maybeBundleVersion, maybeCliVe
|
||||
logger.debug(`Finished downloading CodeQL bundle to ${archivedBundlePath} (${downloadDurationMs} ms).`);
|
||||
logger.debug("Extracting CodeQL bundle.");
|
||||
const extractionStart = perf_hooks_1.performance.now();
|
||||
const extractedBundlePath = await toolcache.extractTar(archivedBundlePath);
|
||||
const extractedBundlePath = await extractBundle(archivedBundlePath);
|
||||
const extractionDurationMs = Math.round(perf_hooks_1.performance.now() - extractionStart);
|
||||
logger.debug(`Finished extracting CodeQL bundle to ${extractedBundlePath} (${extractionDurationMs} ms).`);
|
||||
await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger);
|
||||
@@ -527,4 +527,10 @@ async function cleanUpGlob(glob, name, logger) {
|
||||
logger.warning(`Failed to clean up ${name}: ${e}.`);
|
||||
}
|
||||
}
|
||||
async function extractBundle(archivedBundlePath) {
|
||||
if (archivedBundlePath.endsWith(".tar.gz")) {
|
||||
return await toolcache.extractTar(archivedBundlePath);
|
||||
}
|
||||
return await toolcache.extractTar(archivedBundlePath, undefined, "x");
|
||||
}
|
||||
//# sourceMappingURL=setup-codeql.js.map
|
||||
Reference in New Issue
Block a user