Wrap JSON parse errors in resolveExtractor with context

This commit is contained in:
Michael B. Gale
2026-09-22 18:38:53 +01:00
parent 416ff0dea1
commit f042742baf
2 changed files with 15 additions and 2 deletions

9
lib/entry-points.js generated
View File

@@ -153261,7 +153261,14 @@ async function getCodeQLForCmd(logger, cmd, checkVersion) {
}
}
).exec();
return JSON.parse(extractorPath);
try {
return JSON.parse(extractorPath);
} catch (err) {
throw new Error(
`Failed to parse extractor path for '${language}' from CLI: ${getErrorMessage(err)}
Output was: ${extractorPath}`
);
}
},
async resolveQueriesStartingPacks(queries) {
const codeqlArgs = [