Create helper isPythonDependencyInstallationDisabled
This commit is contained in:
parent
afef25e1e7
commit
2e27b3c56b
9 changed files with 37 additions and 41 deletions
|
|
@ -16,7 +16,11 @@ import { getGitHubVersion } from "./api-client";
|
|||
import { CodeQL } from "./codeql";
|
||||
import * as configUtils from "./config-utils";
|
||||
import { EnvVar } from "./environment";
|
||||
import { Feature, Features } from "./feature-flags";
|
||||
import {
|
||||
Feature,
|
||||
Features,
|
||||
isPythonDependencyInstallationDisabled,
|
||||
} from "./feature-flags";
|
||||
import {
|
||||
checkInstallPython311,
|
||||
initCodeQL,
|
||||
|
|
@ -293,16 +297,7 @@ async function run() {
|
|||
config.languages.includes(Language.python) &&
|
||||
getRequiredInput("setup-python-dependencies") === "true"
|
||||
) {
|
||||
if (
|
||||
(await features.getValue(
|
||||
Feature.DisablePythonDependencyInstallationEnabled,
|
||||
codeql,
|
||||
)) ||
|
||||
(await features.getValue(
|
||||
Feature.PythonDefaultIsToSkipDependencyInstallationEnabled,
|
||||
codeql,
|
||||
))
|
||||
) {
|
||||
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
|
||||
logger.info("Skipping python dependency installation");
|
||||
} else {
|
||||
try {
|
||||
|
|
@ -450,16 +445,7 @@ async function run() {
|
|||
}
|
||||
|
||||
// Disable Python dependency extraction if feature flag set
|
||||
if (
|
||||
(await features.getValue(
|
||||
Feature.DisablePythonDependencyInstallationEnabled,
|
||||
codeql,
|
||||
)) ||
|
||||
(await features.getValue(
|
||||
Feature.PythonDefaultIsToSkipDependencyInstallationEnabled,
|
||||
codeql,
|
||||
))
|
||||
) {
|
||||
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
|
||||
core.exportVariable(
|
||||
"CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION",
|
||||
"true",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue