Experiment with asking tar to figure out the decompression method
This commit is contained in:
parent
b43ac1c23f
commit
e2572269a1
3 changed files with 16 additions and 3 deletions
|
|
@ -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");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue