mirror of
https://github.com/github/codeql-action.git
synced 2025-12-24 08:10:06 +08:00
Improve method naming
This commit is contained in:
10
lib/upload-lib.js
generated
10
lib/upload-lib.js
generated
@@ -81841,10 +81841,10 @@ function satisfiesGHESVersion(ghesVersion, range, defaultIfInvalid) {
|
||||
function cloneObject(obj) {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
async function cleanUpPath(file, name, logger) {
|
||||
logger.debug(`Cleaning up ${name}.`);
|
||||
try {
|
||||
await fs.promises.rm(glob, {
|
||||
await fs.promises.rm(file, {
|
||||
force: true,
|
||||
recursive: true
|
||||
});
|
||||
@@ -83247,7 +83247,7 @@ async function extractTarZst(tar, dest, tarVersion, logger) {
|
||||
});
|
||||
});
|
||||
} catch (e) {
|
||||
await cleanUpGlob(dest, "extraction destination directory", logger);
|
||||
await cleanUpPath(dest, "extraction destination directory", logger);
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
@@ -83327,7 +83327,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat
|
||||
`Failed to download and extract CodeQL bundle using streaming with error: ${getErrorMessage(e)}`
|
||||
);
|
||||
core9.warning(`Falling back to downloading the bundle before extracting.`);
|
||||
await cleanUpGlob(dest, "CodeQL bundle", logger);
|
||||
await cleanUpPath(dest, "CodeQL bundle", logger);
|
||||
}
|
||||
const toolsDownloadStart = import_perf_hooks.performance.now();
|
||||
const archivedBundlePath = await toolcache2.downloadTool(
|
||||
@@ -83360,7 +83360,7 @@ async function downloadAndExtract(codeqlURL, compressionMethod, dest, authorizat
|
||||
)}).`
|
||||
);
|
||||
} finally {
|
||||
await cleanUpGlob(archivedBundlePath, "CodeQL bundle archive", logger);
|
||||
await cleanUpPath(archivedBundlePath, "CodeQL bundle archive", logger);
|
||||
}
|
||||
return {
|
||||
compressionMethod,
|
||||
|
||||
Reference in New Issue
Block a user