C++: Map C++ TRAP caching flag to env var.
This commit is contained in:
parent
2949ab83fb
commit
f1915cce98
3 changed files with 32 additions and 1 deletions
14
lib/init-action.js
generated
14
lib/init-action.js
generated
|
|
@ -244,6 +244,20 @@ async function run() {
|
|||
core.exportVariable(envVar, "true");
|
||||
}
|
||||
}
|
||||
if (config.languages.includes(languages_1.Language.cpp)) {
|
||||
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
|
||||
if (process.env[envVar]) {
|
||||
logger.info(`Environment variable ${envVar} already set. Not en/disabling CodeQL C++ TRAP caching support`);
|
||||
}
|
||||
else if (await features.getValue(feature_flags_1.Feature.CppTrapCachingEnabled, codeql)) {
|
||||
logger.info("Enabling CodeQL C++ TRAP caching support");
|
||||
core.exportVariable(envVar, "true");
|
||||
}
|
||||
else {
|
||||
logger.info("Disabling CodeQL C++ TRAP caching support");
|
||||
core.exportVariable(envVar, "false");
|
||||
}
|
||||
}
|
||||
// Disable Python dependency extraction if feature flag set
|
||||
if (await (0, feature_flags_1.isPythonDependencyInstallationDisabled)(codeql, features)) {
|
||||
core.exportVariable("CODEQL_EXTRACTOR_PYTHON_DISABLE_LIBRARY_EXTRACTION", "true");
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -442,6 +442,23 @@ async function run() {
|
|||
}
|
||||
}
|
||||
|
||||
if (config.languages.includes(Language.cpp)) {
|
||||
const envVar = "CODEQL_EXTRACTOR_CPP_TRAP_CACHING";
|
||||
if (process.env[envVar]) {
|
||||
logger.info(
|
||||
`Environment variable ${envVar} already set. Not en/disabling CodeQL C++ TRAP caching support`,
|
||||
);
|
||||
} else if (
|
||||
await features.getValue(Feature.CppTrapCachingEnabled, codeql)
|
||||
) {
|
||||
logger.info("Enabling CodeQL C++ TRAP caching support");
|
||||
core.exportVariable(envVar, "true");
|
||||
} else {
|
||||
logger.info("Disabling CodeQL C++ TRAP caching support");
|
||||
core.exportVariable(envVar, "false");
|
||||
}
|
||||
}
|
||||
|
||||
// Disable Python dependency extraction if feature flag set
|
||||
if (await isPythonDependencyInstallationDisabled(codeql, features)) {
|
||||
core.exportVariable(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue