mirror of
https://github.com/github/codeql-action.git
synced 2026-01-01 04:00:24 +08:00
Ensure queries[language] objects are initialized
This commit is contained in:
@@ -760,6 +760,14 @@ export async function getDefaultConfig(
|
||||
logger
|
||||
);
|
||||
const queries: Queries = {};
|
||||
for (const language of languages) {
|
||||
if (queries[language] === undefined) {
|
||||
queries[language] = {
|
||||
builtin: [],
|
||||
custom: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
await addDefaultQueries(codeQL, languages, queries);
|
||||
if (queriesInput) {
|
||||
await addQueriesFromWorkflow(
|
||||
@@ -834,6 +842,14 @@ async function loadConfig(
|
||||
);
|
||||
|
||||
const queries: Queries = {};
|
||||
for (const language of languages) {
|
||||
if (queries[language] === undefined) {
|
||||
queries[language] = {
|
||||
builtin: [],
|
||||
custom: [],
|
||||
};
|
||||
}
|
||||
}
|
||||
const pathsIgnore: string[] = [];
|
||||
const paths: string[] = [];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user