mirror of
https://github.com/github/codeql-action.git
synced 2026-10-03 17:41:28 +00:00
Pass environment explicitly to CLI caching functions
This commit is contained in:
10
lib/entry-points.js
generated
10
lib/entry-points.js
generated
@@ -146251,7 +146251,7 @@ var cachedCodeQlVersion = void 0;
|
||||
function getCommandCacheFilePath(env) {
|
||||
return import_path.default.join(getTemporaryDirectory(env), COMMAND_CACHE_FILENAME);
|
||||
}
|
||||
function cacheCodeQlVersion(cmd, version, env = getEnv()) {
|
||||
function cacheCodeQlVersion(cmd, version, env) {
|
||||
if (cachedCodeQlVersion !== void 0) {
|
||||
throw new Error("cacheCodeQlVersion() should be called only once");
|
||||
}
|
||||
@@ -146262,7 +146262,7 @@ function cacheCodeQlVersion(cmd, version, env = getEnv()) {
|
||||
"utf8"
|
||||
);
|
||||
}
|
||||
function getCachedCodeQlVersion(cmd, env = getEnv()) {
|
||||
function getCachedCodeQlVersion(env, cmd) {
|
||||
if (cachedCodeQlVersion !== void 0) {
|
||||
return cachedCodeQlVersion;
|
||||
}
|
||||
@@ -146834,7 +146834,7 @@ async function createStatusReportBase(actionName, status, actionStartedAt, confi
|
||||
core7.exportVariable("CODEQL_WORKFLOW_STARTED_AT" /* WORKFLOW_STARTED_AT */, workflowStartedAt);
|
||||
}
|
||||
const runnerOs = getRequiredEnvParam("RUNNER_OS");
|
||||
const codeQlCliVersion = getCachedCodeQlVersion();
|
||||
const codeQlCliVersion = getCachedCodeQlVersion(getEnv());
|
||||
const actionRef = process.env["GITHUB_ACTION_REF"] || "";
|
||||
const testingEnvironment = getTestingEnvironment();
|
||||
if (testingEnvironment) {
|
||||
@@ -151870,7 +151870,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
return cmd;
|
||||
},
|
||||
async getVersion() {
|
||||
let result = getCachedCodeQlVersion(cmd);
|
||||
let result = getCachedCodeQlVersion(getEnv(), cmd);
|
||||
if (result === void 0) {
|
||||
result = await runCliJson(
|
||||
cmd,
|
||||
@@ -151879,7 +151879,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
noStreamStdout: true
|
||||
}
|
||||
);
|
||||
cacheCodeQlVersion(cmd, result);
|
||||
cacheCodeQlVersion(cmd, result, getEnv());
|
||||
}
|
||||
return result;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user