Propagate --working-dir argument

This commit is contained in:
Michael B. Gale 2023-06-02 19:36:07 +01:00
parent fce65da29a
commit 6f07b504a5
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
9 changed files with 25 additions and 22 deletions

5
lib/codeql.js generated
View file

@ -375,13 +375,16 @@ async function getCodeQLForCmd(cmd, checkVersion) {
throw new Error(`Unexpected output from codeql resolve queries: ${e}`);
}
},
async resolveBuildEnvironment(language) {
async resolveBuildEnvironment(workingDir, language) {
const codeqlArgs = [
"resolve",
"build-environment",
`--language=${language}`,
...getExtraOptionsFromEnv(["resolve", "build-environment"]),
];
if (workingDir !== undefined) {
codeqlArgs.push("--working-dir", workingDir);
}
const output = await runTool(cmd, codeqlArgs);
try {
return JSON.parse(output);