Pass env to all ToolRunners in codeql.ts

This commit is contained in:
Michael B. Gale
2026-10-26 10:50:07 +00:00
parent 49de08391c
commit 516bd7cc48
2 changed files with 20 additions and 6 deletions

13
lib/entry-points.js generated
View File

@@ -177331,7 +177331,9 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) {
])
);
}
await new toolrunner3.ToolRunner(cmd, args).exec();
await new toolrunner3.ToolRunner(cmd, args, {
env: env.getDefined()
}).exec();
},
async databaseExportDiagnostics(databasePath, sarifFile, automationDetailsId) {
const args = [
@@ -177350,7 +177352,9 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) {
if (automationDetailsId !== void 0) {
args.push("--sarif-category", automationDetailsId);
}
await new toolrunner3.ToolRunner(cmd, args).exec();
await new toolrunner3.ToolRunner(cmd, args, {
env: env.getDefined()
}).exec();
},
async diagnosticsExport(sarifFile, automationDetailsId, config, diagnosticDir) {
let configPath = getGeneratedCodeScanningConfigPath(config);
@@ -177377,7 +177381,9 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) {
if (automationDetailsId !== void 0) {
args.push("--sarif-category", automationDetailsId);
}
await new toolrunner3.ToolRunner(cmd, args).exec();
await new toolrunner3.ToolRunner(cmd, args, {
env: env.getDefined()
}).exec();
},
async resolveExtractor(language) {
let extractorPath = "";
@@ -177393,6 +177399,7 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion, env = getEnv()) {
...getExtraOptionsFromEnv(["resolve", "extractor"])
],
{
env: env.getDefined(),
silent: true,
listeners: {
stdout: (data) => {