mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 09:14:58 +00:00
Pass tarSupportsZstd to getLatestNightlyBundle
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
9
lib/entry-points.js
generated
9
lib/entry-points.js
generated
@@ -152288,7 +152288,8 @@ async function getCodeQLSource(toolsInput, defaultCliVersion, rawLanguages, useO
|
||||
bundle = await getLatestNightlyBundle(
|
||||
{ env: getEnv(), features, logger },
|
||||
rawLanguages,
|
||||
variant
|
||||
variant,
|
||||
tarSupportsZstd
|
||||
);
|
||||
toolsInput = bundle.url;
|
||||
}
|
||||
@@ -152727,12 +152728,10 @@ async function useZstdBundle(cliVersion2, tarSupportsZstd) {
|
||||
function getTempExtractionDir(tempDir) {
|
||||
return path13.join(tempDir, v4_default());
|
||||
}
|
||||
async function getLatestNightlyBundle(action, rawLanguages, variant) {
|
||||
const { logger } = action;
|
||||
const zstdAvailability = await isZstdAvailable(logger);
|
||||
async function getLatestNightlyBundle(action, rawLanguages, variant, tarSupportsZstd) {
|
||||
const compressionMethod = await useZstdBundle(
|
||||
CODEQL_VERSION_ZSTD_BUNDLE,
|
||||
zstdAvailability.available
|
||||
tarSupportsZstd
|
||||
) ? "zstd" : "gzip";
|
||||
const platform2 = getBundlePlatform();
|
||||
const language = await getPerLanguageBundleLanguage(action, {
|
||||
|
||||
@@ -428,7 +428,7 @@ test.serial(
|
||||
false, // useOverlayAwareDefaultCliVersion
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
true, // tarSupportsZstd
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
@@ -498,7 +498,7 @@ test.serial(
|
||||
false, // useOverlayAwareDefaultCliVersion
|
||||
SAMPLE_DOTCOM_API_DETAILS,
|
||||
GitHubVariant.DOTCOM,
|
||||
false,
|
||||
true, // tarSupportsZstd
|
||||
features,
|
||||
logger,
|
||||
);
|
||||
|
||||
@@ -493,6 +493,7 @@ export async function getCodeQLSource(
|
||||
{ env: getEnv(), features, logger },
|
||||
rawLanguages,
|
||||
variant,
|
||||
tarSupportsZstd,
|
||||
);
|
||||
toolsInput = bundle.url;
|
||||
}
|
||||
@@ -1178,13 +1179,12 @@ async function getLatestNightlyBundle(
|
||||
action: ActionState<["Logger", "ReadOnlyEnv", "FeatureFlags"]>,
|
||||
rawLanguages: string[] | undefined,
|
||||
variant: util.GitHubVariant,
|
||||
tarSupportsZstd: boolean,
|
||||
): Promise<CodeQLBundle> {
|
||||
const { logger } = action;
|
||||
const zstdAvailability = await tar.isZstdAvailable(logger);
|
||||
// The nightly is guaranteed to have a zstd bundle
|
||||
const compressionMethod = (await useZstdBundle(
|
||||
CODEQL_VERSION_ZSTD_BUNDLE,
|
||||
zstdAvailability.available,
|
||||
tarSupportsZstd,
|
||||
))
|
||||
? "zstd"
|
||||
: "gzip";
|
||||
|
||||
Reference in New Issue
Block a user