Skip to content

Commit 3b632c3

Browse files
committed
Try listener option
1 parent b63d497 commit 3b632c3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/codeql.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,15 @@ function getCodeQLForCmd(cmd: string): CodeQL {
233233
return JSON.parse(output);
234234
},
235235
databaseAnalyze: async function(databasePath: string, sarifFile: string, querySuite: string) {
236-
try {
236+
const options = {};
237+
options.listeners = {
238+
stdout: (data: Buffer) => {
239+
core.debug(data.toString());
240+
},
241+
stderr: (data: Buffer) => {
242+
core.error(data.toString());
243+
}
244+
};
237245
await exec.exec(cmd, [
238246
'database',
239247
'analyze',
@@ -244,10 +252,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
244252
'--output=' + sarifFile,
245253
'--no-sarif-add-snippets',
246254
querySuite
247-
]);
248-
} catch (error) {
249-
throw new Error ("Got it!" + error.message)
250-
}
255+
], options);
251256
}
252257
};
253258
}

0 commit comments

Comments
 (0)