mirror of
https://github.com/github/codeql-action.git
synced 2025-12-31 03:30:14 +08:00
Add detected tar version to telemetry
This commit is contained in:
9
lib/setup-codeql.js
generated
9
lib/setup-codeql.js
generated
@@ -509,10 +509,13 @@ 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;
|
||||
if (!toolsInput && (await features.getValue(feature_flags_1.Feature.ZstdBundle))) {
|
||||
try {
|
||||
if (await tar.isZstdAvailable(logger)) {
|
||||
const availableResult = await tar.isZstdAvailable(logger);
|
||||
tarVersion = availableResult.version;
|
||||
if (availableResult.available) {
|
||||
return await setupCodeQLBundleWithZstdOption(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, true, logger);
|
||||
}
|
||||
else {
|
||||
@@ -527,9 +530,7 @@ async function setupCodeQLBundle(toolsInput, apiDetails, tempDir, variant, defau
|
||||
}
|
||||
}
|
||||
const result = await setupCodeQLBundleWithZstdOption(toolsInput, apiDetails, tempDir, variant, defaultCliVersion, false, logger);
|
||||
if (zstdError) {
|
||||
result.toolsDownloadStatusReport = Object.assign({}, result.toolsDownloadStatusReport, { zstdError: (0, util_1.wrapError)(zstdError).message });
|
||||
}
|
||||
result.toolsDownloadStatusReport = Object.assign({}, result.toolsDownloadStatusReport, tarVersion ? { tarVersion } : {}, zstdError ? { zstdError: (0, util_1.wrapError)(zstdError).message } : {});
|
||||
return result;
|
||||
}
|
||||
async function cleanUpGlob(glob, name, logger) {
|
||||
|
||||
Reference in New Issue
Block a user