wrap more codeql calls in the error catcher wrapper
This commit is contained in:
parent
7b7e0e12b7
commit
6ef533485e
3 changed files with 18 additions and 14 deletions
8
lib/codeql.js
generated
8
lib/codeql.js
generated
|
|
@ -272,13 +272,13 @@ function getCodeQLForCmd(cmd) {
|
|||
extractScannedLanguage: async function (databasePath, language) {
|
||||
// Get extractor location
|
||||
let extractorPath = '';
|
||||
await exec.exec(cmd, [
|
||||
await exec_wrapper_1.exec_wrapper(cmd, [
|
||||
'resolve',
|
||||
'extractor',
|
||||
'--format=json',
|
||||
'--language=' + language,
|
||||
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
||||
], {
|
||||
], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']], {
|
||||
silent: true,
|
||||
listeners: {
|
||||
stdout: (data) => { extractorPath += data.toString(); },
|
||||
|
|
@ -289,14 +289,14 @@ function getCodeQLForCmd(cmd) {
|
|||
const ext = process.platform === 'win32' ? '.cmd' : '.sh';
|
||||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||
// Run trace command
|
||||
await exec.exec(cmd, [
|
||||
await exec_wrapper_1.exec_wrapper(cmd, [
|
||||
'database',
|
||||
'trace-command',
|
||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||
databasePath,
|
||||
'--',
|
||||
traceCommand
|
||||
]);
|
||||
], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]);
|
||||
},
|
||||
finalizeDatabase: async function (databasePath) {
|
||||
await exec_wrapper_1.exec_wrapper(cmd, [
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
|
|
@ -359,7 +359,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
extractScannedLanguage: async function(databasePath: string, language: Language) {
|
||||
// Get extractor location
|
||||
let extractorPath = '';
|
||||
await exec.exec(
|
||||
await exec_wrapper(
|
||||
cmd,
|
||||
[
|
||||
'resolve',
|
||||
|
|
@ -368,6 +368,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
'--language=' + language,
|
||||
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
||||
],
|
||||
[[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']],
|
||||
{
|
||||
silent: true,
|
||||
listeners: {
|
||||
|
|
@ -381,14 +382,17 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
|||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||
|
||||
// Run trace command
|
||||
await exec.exec(cmd, [
|
||||
'database',
|
||||
'trace-command',
|
||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||
databasePath,
|
||||
'--',
|
||||
traceCommand
|
||||
]);
|
||||
await exec_wrapper(
|
||||
cmd, [
|
||||
'database',
|
||||
'trace-command',
|
||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||
databasePath,
|
||||
'--',
|
||||
traceCommand
|
||||
],
|
||||
[[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]
|
||||
);
|
||||
},
|
||||
finalizeDatabase: async function(databasePath: string) {
|
||||
await exec_wrapper(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue