Warn when multiple bundles for a single CLI are found in the toolcache

This commit is contained in:
Henry Mercer 2023-02-06 12:28:33 +00:00
parent d49282c3b5
commit d3f2b2e6d2
3 changed files with 17 additions and 6 deletions

9
lib/setup-codeql.js generated
View file

@ -356,9 +356,14 @@ async function getCodeQLSource(toolsInput, bypassToolcache, defaultCliVersion, a
"toolcache, using that.");
codeqlFolder = toolcache.find("CodeQL", candidateVersions[0]);
}
else if (candidateVersions.length === 0) {
logger.debug(`Didn't find any versions of the CodeQL tools starting with ${cliVersion} ` +
`in the toolcache. Trying next fallback method.`);
}
else {
logger.debug(`Did not find exactly one version of the CodeQL tools starting with ${cliVersion} ` +
`(instead found ${candidateVersions.length}). Trying next fallback method.`);
logger.warning(`Found ${candidateVersions.length} versions of the CodeQL tools starting with ` +
`${cliVersion} in the toolcache, but at most one was expected.`);
logger.debug("Trying next fallback method.");
}
}
}

File diff suppressed because one or more lines are too long