move CODEQL_RUNNER population to tracer-config.ts

This commit is contained in:
Robert 2021-01-12 10:49:08 +00:00
parent cd2eafc8e3
commit c796788c33
6 changed files with 18 additions and 18 deletions

5
lib/runner.js generated
View file

@ -126,11 +126,6 @@ program
if (process.platform === "win32") {
await init_1.injectWindowsTracer(parseTraceProcessName(), parseTraceProcessLevel(), config, codeql, tracerConfig);
}
// On macos it's necessary to prefix the build command with the runner exectuable
// on order to trace when System Integrity Protection is enabled.
// The exectuable also exists and works for other platforms so we output this env
// var with a path to the runner regardless so it's always available.
tracerConfig.env["CODEQL_RUNNER"] = path.join(tracerConfig.env["CODEQL_DIST"], "tools", tracerConfig.env["CODEQL_PLATFORM"], "runner");
// Always output a json file of the env that can be consumed programmatically
const jsonEnvFile = path.join(config.tempDir, codeqlEnvJsonFilename);
fs.writeFileSync(jsonEnvFile, JSON.stringify(tracerConfig.env));