Don't use Zstandard bundles on Windows

In testing, gzip performs better than Zstandard on Windows.
This commit is contained in:
Henry Mercer 2024-10-10 19:24:32 +01:00
parent 9d1e406cd6
commit eefb943f7e
7 changed files with 7 additions and 8 deletions

5
lib/setup-codeql.js generated
View file

@ -553,7 +553,10 @@ function sanitizeUrlForStatusReport(url) {
: "sanitized-value";
}
async function useZstdBundle(cliVersion, features, tarSupportsZstd) {
return (tarSupportsZstd &&
return (
// In testing, gzip performs better than zstd on Windows.
process.platform !== "win32" &&
tarSupportsZstd &&
semver.gte(cliVersion, feature_flags_1.CODEQL_VERSION_ZSTD_BUNDLE) &&
!!(await features.getValue(feature_flags_1.Feature.ZstdBundle)));
}