Don't override env var if it is already set
This commit is contained in:
parent
d591d172c8
commit
5d314b71b0
3 changed files with 12 additions and 7 deletions
|
|
@ -594,15 +594,18 @@ async function run() {
|
|||
ToolsFeature.PythonDefaultIsToNotExtractStdlib,
|
||||
)
|
||||
) {
|
||||
// We are in the case where the default has switched to not extracting the stdlib.
|
||||
if (
|
||||
if (process.env["CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB"]) {
|
||||
logger.debug(
|
||||
"CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB is already set, so the Action will not override it.",
|
||||
);
|
||||
} else if (
|
||||
!(await features.getValue(
|
||||
Feature.PythonDefaultIsToNotExtractStdlib,
|
||||
codeql,
|
||||
))
|
||||
) {
|
||||
// We are in a situation where the feature flag is not rolled out,
|
||||
// so we need to suppress the new default behavior.
|
||||
// so we need to suppress the new default CLI behavior.
|
||||
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_EXTRACT_STDLIB", "true");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue