Address comments

This commit is contained in:
Arthur Baars 2021-05-24 11:00:02 +02:00
parent 4f51b8c47e
commit 44c6b33642
3 changed files with 25 additions and 5 deletions

14
lib/codeql.js generated
View file

@ -429,7 +429,12 @@ function getCodeQLForCmd(cmd) {
},
},
}).exec();
return JSON.parse(output);
try {
return JSON.parse(output);
}
catch (e) {
throw new Error(`Unexpected output from codeql resolve languages: ${e}`);
}
},
async resolveQueries(queries, extraSearchPath) {
const codeqlArgs = [
@ -450,7 +455,12 @@ function getCodeQLForCmd(cmd) {
},
},
}).exec();
return JSON.parse(output);
try {
return JSON.parse(output);
}
catch (e) {
throw new Error(`Unexpected output from codeql resolve queries: ${e}`);
}
},
async databaseAnalyze(databasePath, sarifFile, extraSearchPath, querySuite, memoryFlag, addSnippetsFlag, threadsFlag, automationDetailsId) {
const args = [