Add error handling for undefined extractors in language resolution

This commit is contained in:
Mario Campos
2026-06-18 10:36:50 -05:00
parent b18df17ee7
commit 553eef0d3f
2 changed files with 14 additions and 2 deletions

8
lib/entry-points.js generated
View File

@@ -154094,7 +154094,13 @@ async function getCodeQLForCmd(cmd, checkVersion) {
},
async resolveExtractor(language) {
const output = await this.resolveLanguages();
return output.extractors[language][0].extractor_root;
const extractors = output.extractors[language];
if (extractors === void 0) {
throw new Error(
`Unable to resolve an extractor for the language '${language}'.`
);
}
return extractors[0].extractor_root;
},
async resolveQueriesStartingPacks(queries) {
const codeqlArgs = [