Add debug statements

This commit is contained in:
jhutchings1
2020-07-11 12:18:01 -07:00
parent 066d9716c6
commit f2c8606b17
+2 -1
View File
@@ -131,8 +131,9 @@ async function runQueries(databaseFolder: string, sarifFolder: string, config: c
try {
await codeql.databaseAnalyze(path.join(databaseFolder, database), sarifFile, querySuite);
} catch (analysisError) {
core.debug(analysisError.message);
if (analysisError.message.contains("exit code 32")) {
throw new Error('Unable to analyze ' + database + ' because CodeQL was unable to detect any code for that language. \n [Learn more](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning) about how to troubleshoot this error. ')
throw new Error('Unable to analyze ' + database + ' because CodeQL was unable to detect any code for that language. \n [Learn more](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/troubleshooting-code-scanning) about how to troubleshoot this error. ');
} else {
throw new Error(analysisError);
}