Skip to content

Commit b63d497

Browse files
committed
Test
1 parent f1569d5 commit b63d497

File tree

2 files changed

+16
-13
lines changed

2 files changed

+16
-13
lines changed

src/codeql.ts

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -233,17 +233,21 @@ function getCodeQLForCmd(cmd: string): CodeQL {
233233
return JSON.parse(output);
234234
},
235235
databaseAnalyze: async function(databasePath: string, sarifFile: string, querySuite: string) {
236-
await exec.exec(cmd, [
237-
'database',
238-
'analyze',
239-
util.getMemoryFlag(),
240-
util.getThreadsFlag(),
241-
databasePath,
242-
'--format=sarif-latest',
243-
'--output=' + sarifFile,
244-
'--no-sarif-add-snippets',
245-
querySuite
246-
]);
236+
try {
237+
await exec.exec(cmd, [
238+
'database',
239+
'analyze',
240+
util.getMemoryFlag(),
241+
util.getThreadsFlag(),
242+
databasePath,
243+
'--format=sarif-latest',
244+
'--output=' + sarifFile,
245+
'--no-sarif-add-snippets',
246+
querySuite
247+
]);
248+
} catch (error) {
249+
throw new Error ("Got it!" + error.message)
250+
}
247251
}
248252
};
249253
}

src/finalize-db.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ async function runQueries(databaseFolder: string, sarifFolder: string, config: c
131131
try {
132132
await codeql.databaseAnalyze(path.join(databaseFolder, database), sarifFile, querySuite);
133133
} catch (analysisError) {
134-
core.debug(analysisError.message);
134+
core.debug("test test test" + analysisError.message);
135135
if (analysisError.message.contains("exit code 32")) {
136136
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. ');
137137
} else {
@@ -175,7 +175,6 @@ async function run() {
175175
}
176176

177177
} catch (error) {
178-
core.debug(error.message);
179178
core.setFailed(error.message);
180179
await util.reportActionFailed('finish', error.message, error.stack);
181180
return;

0 commit comments

Comments
 (0)