This commit is contained in:
Rasmus Wriedt Larsen 2023-12-13 12:27:17 +01:00
parent a13f4b8aed
commit 1e69b89bc7
No known key found for this signature in database
6 changed files with 22 additions and 6 deletions

9
lib/init-action.js generated
View file

@ -146,7 +146,8 @@ async function run() {
await (0, init_1.checkInstallPython311)(config.languages, codeql);
if (config.languages.includes(languages_1.Language.python) &&
(0, actions_util_1.getRequiredInput)("setup-python-dependencies") === "true") {
if (await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) {
if ((await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) ||
(await features.getValue(feature_flags_1.Feature.PythonDefaultIsToSkipDependencyInstallationEnabled, codeql))) {
logger.info("Skipping python dependency installation");
}
else {
@ -246,9 +247,13 @@ async function run() {
}
}
// Disable Python dependency extraction if feature flag set
if (await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) {
if ((await features.getValue(feature_flags_1.Feature.DisablePythonDependencyInstallationEnabled, codeql)) ||
(await features.getValue(feature_flags_1.Feature.PythonDefaultIsToSkipDependencyInstallationEnabled, codeql))) {
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
}
else {
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_FORCE_ENABLE_LIBRARY_EXTRACTION_UNTIL_2_17_0", "true");
}
const sourceRoot = path.resolve((0, util_1.getRequiredEnvParam)("GITHUB_WORKSPACE"), (0, actions_util_1.getOptionalInput)("source-root") || "");
const tracerConfig = await (0, init_1.runInit)(codeql, config, sourceRoot, "Runner.Worker.exe", registriesInput, features, apiDetails, logger);
if (tracerConfig !== undefined) {