mirror of
https://github.com/github/codeql-action.git
synced 2026-04-17 12:33:16 +00:00
Experiment with asking tar to figure out the decompression method
This commit is contained in:
@@ -526,7 +526,7 @@ export const downloadCodeQL = async function (
|
||||
|
||||
logger.debug("Extracting CodeQL bundle.");
|
||||
const extractionStart = performance.now();
|
||||
const extractedBundlePath = await toolcache.extractTar(archivedBundlePath);
|
||||
const extractedBundlePath = await extractBundle(archivedBundlePath);
|
||||
const extractionDurationMs = Math.round(performance.now() - extractionStart);
|
||||
logger.debug(
|
||||
`Finished extracting CodeQL bundle to ${extractedBundlePath} (${extractionDurationMs} ms).`,
|
||||
@@ -705,3 +705,10 @@ async function cleanUpGlob(glob: string, name: string, logger: Logger) {
|
||||
logger.warning(`Failed to clean up ${name}: ${e}.`);
|
||||
}
|
||||
}
|
||||
|
||||
async function extractBundle(archivedBundlePath: string): Promise<string> {
|
||||
if (archivedBundlePath.endsWith(".tar.gz")) {
|
||||
return await toolcache.extractTar(archivedBundlePath);
|
||||
}
|
||||
return await toolcache.extractTar(archivedBundlePath, undefined, "x");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user