Improve logging

This commit is contained in:
Henry Mercer 2024-10-10 18:54:18 +01:00
parent df0590b2ee
commit 90c42c41ec
9 changed files with 26 additions and 9 deletions

View file

@ -517,9 +517,6 @@ export const downloadCodeQL = async function (
} else {
logger.debug("Downloading CodeQL tools without an authorization token.");
}
logger.info(
`Downloading CodeQL tools from ${codeqlURL} . This may take a while.`,
);
const { extractedBundlePath, statusReport } = await downloadAndExtract(
codeqlURL,
@ -552,12 +549,19 @@ export const downloadCodeQL = async function (
bundleVersion,
logger,
);
const toolcacheStart = performance.now();
const toolcachedBundlePath = await toolcache.cacheDir(
extractedBundlePath,
"CodeQL",
toolcacheVersion,
);
logger.info(
`Added CodeQL bundle to the tool cache (${
performance.now() - toolcacheStart
} ms).`,
);
// Defensive check: we expect `cacheDir` to copy the bundle to a new location.
if (toolcachedBundlePath !== extractedBundlePath) {
await cleanUpGlob(