mirror of
https://github.com/github/codeql-action.git
synced 2026-01-06 14:40:10 +08:00
Add the feature to bypass the toolcache for kotlin and swift
This works by moving the logic to check for toolcache bypass out of creating the codeql instance. The logic now _may_ perform an API request in order to check what languages are in the repository. This check is redundant because the same call is being made later in the action when the actual list of languages is calculated.
This commit is contained in:
5
lib/codeql.js
generated
5
lib/codeql.js
generated
@@ -210,7 +210,7 @@ async function getCodeQLBundleDownloadURL(apiDetails, variant, logger) {
|
||||
* version requirement. Must be set to true outside tests.
|
||||
* @returns a { CodeQL, toolsVersion } object.
|
||||
*/
|
||||
async function setupCodeQL(codeqlURL, apiDetails, tempDir, variant, features, logger, checkVersion) {
|
||||
async function setupCodeQL(codeqlURL, apiDetails, tempDir, variant, bypassToolcache, logger, checkVersion) {
|
||||
try {
|
||||
const forceLatestReason =
|
||||
// We use the special value of 'latest' to prioritize the version in the
|
||||
@@ -221,8 +221,7 @@ async function setupCodeQL(codeqlURL, apiDetails, tempDir, variant, features, lo
|
||||
// the toolcache when the appropriate feature is enabled. This
|
||||
// allows us to quickly rollback a broken bundle that has made its way
|
||||
// into the toolcache.
|
||||
codeqlURL === undefined &&
|
||||
(await features.getValue(feature_flags_1.Feature.BypassToolcacheEnabled))
|
||||
codeqlURL === undefined && bypassToolcache
|
||||
? "a specific version of CodeQL was not requested and the bypass toolcache feature is enabled"
|
||||
: undefined;
|
||||
const forceLatest = forceLatestReason !== undefined;
|
||||
|
||||
Reference in New Issue
Block a user