Autobuild: Prefix invocations with CODEQL_RUNNER

This commit is contained in:
Aditya Sharad
2021-12-07 18:42:59 -08:00
parent fef9ef14e5
commit 2431162ee9
+11 -1
View File
@@ -732,7 +732,17 @@ async function getCodeQLForCmd(
"-Dmaven.wagon.http.pool=false",
].join(" ");
await runTool(autobuildCmd);
const runnerExecutable = process.env["CODEQL_RUNNER"] || "";
// On Mac, prefixing with the runner executable is required to handle System Integrity Protection.
if (runnerExecutable) {
// Earlier steps (init) are expected to have written the runner executable path
// to the tracing environment, and the current step is expected to have
// correctly loaded that environment.
await runTool(runnerExecutable, [autobuildCmd]);
} else {
// Fallback in case CODEQL_RUNNER wasn't correctly set or loaded.
await runTool(autobuildCmd);
}
},
async extractScannedLanguage(databasePath: string, language: Language) {
// Get extractor location