Pass build mode to database init when set

This commit is contained in:
Henry Mercer
2024-01-30 21:59:51 +00:00
parent 55c1fd5777
commit d982a14465
3 changed files with 11 additions and 1 deletions

4
lib/codeql.js generated
View File

@@ -298,6 +298,10 @@ async function getCodeQLForCmd(cmd, checkVersion) {
if (externalRepositoryToken) { if (externalRepositoryToken) {
extraArgs.push("--external-repository-token-stdin"); extraArgs.push("--external-repository-token-stdin");
} }
if (config.buildMode !== undefined &&
(await this.supportsFeature(tools_features_1.ToolsFeature.BuildModeOption))) {
extraArgs.push(`--build-mode=${config.buildMode}`);
}
if (qlconfigFile !== undefined && if (qlconfigFile !== undefined &&
(await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) { (await util.codeQlVersionAbove(this, exports.CODEQL_VERSION_INIT_WITH_QLCONFIG))) {
extraArgs.push(`--qlconfig-file=${qlconfigFile}`); extraArgs.push(`--qlconfig-file=${qlconfigFile}`);

File diff suppressed because one or more lines are too long

View File

@@ -597,6 +597,12 @@ export async function getCodeQLForCmd(
extraArgs.push("--external-repository-token-stdin"); extraArgs.push("--external-repository-token-stdin");
} }
if (
config.buildMode !== undefined &&
(await this.supportsFeature(ToolsFeature.BuildModeOption))
) {
extraArgs.push(`--build-mode=${config.buildMode}`);
}
if ( if (
qlconfigFile !== undefined && qlconfigFile !== undefined &&
(await util.codeQlVersionAbove(this, CODEQL_VERSION_INIT_WITH_QLCONFIG)) (await util.codeQlVersionAbove(this, CODEQL_VERSION_INIT_WITH_QLCONFIG))