Python: absolute basics

probably still need to route some values around
This commit is contained in:
Rasmus Lerchedahl Petersen 2024-10-09 15:30:49 +02:00 committed by yoff
parent 9d1e406cd6
commit 502028f6bc
3 changed files with 18 additions and 0 deletions

View file

@ -65,6 +65,7 @@ import {
getErrorMessage,
} from "./util";
import { validateWorkflow } from "./workflow";
import { isFeatureAvailable } from "@actions/cache";
/** Fields of the init status report that can be sent before `config` is populated. */
interface InitStatusReport extends StatusReportBase {
@ -611,6 +612,15 @@ async function run() {
);
}
if (await codeql.supportsFeature(ToolsFeature.PythonDefaultIsToNotExtractStdlib)) {
// We are in the case where the default has switched to not extracting the stdlib.
if (!(await features.getValue(Feature.CodeqlActionPythonDefaultIsToNotExtractStdlib, codeql))) {
// We are in a situation where the feature flag is not rolled out,
// so we need to suppress the new default behavior.
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true");
}
}
const sourceRoot = path.resolve(
getRequiredEnvParam("GITHUB_WORKSPACE"),
getOptionalInput("source-root") || "",