mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 03:30:14 +08:00
Always capture tar version info
This lets us validate how well tar.zstd rollout will go before 2.19.0.
This commit is contained in:
6
lib/setup-codeql.js
generated
6
lib/setup-codeql.js
generated
@@ -509,12 +509,10 @@ async function setupCodeQLBundleWithZstdOption(toolsInput, apiDetails, tempDir,
|
||||
* @returns the path to the extracted bundle, and the version of the tools
|
||||
*/
|
||||
async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, features, logger) {
|
||||
let tarVersion = undefined;
|
||||
let zstdError = undefined;
|
||||
const availableResult = await tar.isZstdAvailable(logger);
|
||||
if (!toolsInput && (await features.getValue(feature_flags_1.Feature.ZstdBundle))) {
|
||||
try {
|
||||
const availableResult = await tar.isZstdAvailable(logger);
|
||||
tarVersion = availableResult.version;
|
||||
if (availableResult.available) {
|
||||
return await setupCodeQLBundleWithZstdOption(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, true, logger);
|
||||
}
|
||||
@@ -530,7 +528,7 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
}
|
||||
}
|
||||
const result = await setupCodeQLBundleWithZstdOption(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, false, logger);
|
||||
result.toolsDownloadStatusReport = Object.assign({}, result.toolsDownloadStatusReport, tarVersion ? { tarVersion } : {}, zstdError ? { zstdError: (0, util_1.wrapError)(zstdError).message } : {});
|
||||
result.toolsDownloadStatusReport = Object.assign({}, result.toolsDownloadStatusReport, { tarVersion: availableResult.version }, zstdError ? { zstdError: (0, util_1.wrapError)(zstdError).message } : {});
|
||||
return result;
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
|
||||
Reference in New Issue
Block a user