mirror of
https://github.com/github/codeql-action.git
synced 2025-12-16 12:29:14 +08:00
databaseRunQueries(): add optimizeForLastQueryRun parameter
This commit is contained in:
6
lib/codeql.js
generated
6
lib/codeql.js
generated
@@ -472,7 +472,7 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
throw new Error(`Unexpected output from codeql resolve queries: ${e}`);
|
||||
}
|
||||
},
|
||||
async databaseRunQueries(databasePath, extraSearchPath, querySuitePath, flags) {
|
||||
async databaseRunQueries(databasePath, extraSearchPath, querySuitePath, flags, optimizeForLastQueryRun) {
|
||||
const codeqlArgs = [
|
||||
"database",
|
||||
"run-queries",
|
||||
@@ -482,6 +482,10 @@ async function getCodeQLForCmd(cmd, checkVersion) {
|
||||
"-v",
|
||||
...getExtraOptionsFromEnv(["database", "run-queries"]),
|
||||
];
|
||||
if (optimizeForLastQueryRun &&
|
||||
(await util.supportExpectDiscardedCache(this))) {
|
||||
codeqlArgs.push("--expect-discarded-cache");
|
||||
}
|
||||
if (extraSearchPath !== undefined) {
|
||||
codeqlArgs.push("--additional-packs", extraSearchPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user