Introduce codeql.supportsFeature

This is a slightly simpler API
This commit is contained in:
Henry Mercer 2024-01-30 21:53:24 +00:00
parent 0166a8a567
commit 55c1fd5777
21 changed files with 63 additions and 51 deletions

4
lib/tracer-config.js generated
View file

@ -59,7 +59,7 @@ async function getTracerConfigForCluster(config) {
};
}
exports.getTracerConfigForCluster = getTracerConfigForCluster;
async function getCombinedTracerConfig(versionInfo, config) {
async function getCombinedTracerConfig(codeql, config) {
// Abort if there are no traced languages as there's nothing to do
const tracedLanguages = config.languages.filter((l) => (0, languages_1.isTracedLanguage)(l));
if (tracedLanguages.length === 0) {
@ -68,7 +68,7 @@ async function getCombinedTracerConfig(versionInfo, config) {
const mainTracerConfig = await getTracerConfigForCluster(config);
// If the CLI doesn't yet support setting the CODEQL_RUNNER environment variable to
// the runner executable path, we set it here in the Action.
if (!(0, tools_features_1.isSupportedToolsFeature)(versionInfo, tools_features_1.ToolsFeature.SetsCodeqlRunnerEnvVar)) {
if (!(await codeql.supportsFeature(tools_features_1.ToolsFeature.SetsCodeqlRunnerEnvVar))) {
// On MacOS when System Integrity Protection is enabled, it's necessary to prefix
// the build command with the runner executable for indirect tracing, so we expose
// it here via the CODEQL_RUNNER environment variable.