From 066d9716c613d80e5367c5d4591888125614866b Mon Sep 17 00:00:00 2001 From: jhutchings1 Date: Sat, 11 Jul 2020 12:13:09 -0700 Subject: [PATCH] Fix issue with error detection --- src/finalize-db.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/finalize-db.ts b/src/finalize-db.ts index e9ea6e8d9..ecb52af42 100644 --- a/src/finalize-db.ts +++ b/src/finalize-db.ts @@ -131,7 +131,7 @@ async function runQueries(databaseFolder: string, sarifFolder: string, config: c try { await codeql.databaseAnalyze(path.join(databaseFolder, database), sarifFile, querySuite); } catch (analysisError) { - if (analysisError.contains("exit code 32")) { + 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. ') } else { throw new Error(analysisError);