Improve method naming

This commit is contained in:
Henry Mercer
2025-10-28 13:06:14 +00:00
parent 41c0a26213
commit d84f470a9a
9 changed files with 37 additions and 37 deletions

10
lib/upload-lib.js generated
View File

@@ -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,