Skip to content

Commit

Permalink
Autobuild: Prefix invocations with CODEQL_RUNNER
Browse files Browse the repository at this point in the history
Co-authored-by: Aditya Sharad <6874315+adityasharad@users.noreply.github.com>
  • Loading branch information
aeisenberg and adityasharad committed Dec 8, 2021
1 parent 0a1efd7 commit 8fd6eec
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/codeql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8fd6eec

Please sign in to comment.