Bump verbosity when running autobuild script directly in debug mode

This commit is contained in:
Henry Mercer
2024-03-13 17:51:08 +00:00
parent 362c407426
commit 649f3e87e1
9 changed files with 30 additions and 8 deletions

7
lib/codeql.js generated
View File

@@ -316,7 +316,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
throw e;
}
},
async runAutobuild(language) {
async runAutobuild(language, enableDebugLogging) {
const autobuildCmd = path.join(await this.resolveExtractor(language), "tools", process.platform === "win32" ? "autobuild.cmd" : "autobuild.sh");
// Update JAVA_TOOL_OPTIONS to contain '-Dhttp.keepAlive=false'
// This is because of an issue with Azure pipelines timing out connections after 4 minutes
@@ -329,6 +329,11 @@ async function getCodeQLForCmd(cmd, checkVersion) {
"-Dhttp.keepAlive=false",
"-Dmaven.wagon.http.pool=false",
].join(" ");
// Bump the verbosity of the autobuild command if we're in debug mode
if (enableDebugLogging) {
process.env[environment_1.EnvVar.CLI_VERBOSITY] =
process.env[environment_1.EnvVar.CLI_VERBOSITY] || EXTRACTION_DEBUG_MODE_VERBOSITY;
}
// On macOS, System Integrity Protection (SIP) typically interferes with
// CodeQL build tracing of protected binaries.
// The usual workaround is to prefix `$CODEQL_RUNNER` to build commands: