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) {
|
extractScannedLanguage: async function (databasePath, language) {
|
||||||
// Get extractor location
|
// Get extractor location
|
||||||
let extractorPath = '';
|
let extractorPath = '';
|
||||||
await exec.exec(cmd, [
|
await exec_wrapper_1.exec_wrapper(cmd, [
|
||||||
'resolve',
|
'resolve',
|
||||||
'extractor',
|
'extractor',
|
||||||
'--format=json',
|
'--format=json',
|
||||||
'--language=' + language,
|
'--language=' + language,
|
||||||
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
||||||
], {
|
], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']], {
|
||||||
silent: true,
|
silent: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
stdout: (data) => { extractorPath += data.toString(); },
|
stdout: (data) => { extractorPath += data.toString(); },
|
||||||
|
|
@ -289,14 +289,14 @@ function getCodeQLForCmd(cmd) {
|
||||||
const ext = process.platform === 'win32' ? '.cmd' : '.sh';
|
const ext = process.platform === 'win32' ? '.cmd' : '.sh';
|
||||||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||||
// Run trace command
|
// Run trace command
|
||||||
await exec.exec(cmd, [
|
await exec_wrapper_1.exec_wrapper(cmd, [
|
||||||
'database',
|
'database',
|
||||||
'trace-command',
|
'trace-command',
|
||||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||||
databasePath,
|
databasePath,
|
||||||
'--',
|
'--',
|
||||||
traceCommand
|
traceCommand
|
||||||
]);
|
], [[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']]);
|
||||||
},
|
},
|
||||||
finalizeDatabase: async function (databasePath) {
|
finalizeDatabase: async function (databasePath) {
|
||||||
await exec_wrapper_1.exec_wrapper(cmd, [
|
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) {
|
extractScannedLanguage: async function(databasePath: string, language: Language) {
|
||||||
// Get extractor location
|
// Get extractor location
|
||||||
let extractorPath = '';
|
let extractorPath = '';
|
||||||
await exec.exec(
|
await exec_wrapper(
|
||||||
cmd,
|
cmd,
|
||||||
[
|
[
|
||||||
'resolve',
|
'resolve',
|
||||||
|
|
@ -368,6 +368,7 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
||||||
'--language=' + language,
|
'--language=' + language,
|
||||||
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
...getExtraOptionsFromEnv(['resolve', 'extractor']),
|
||||||
],
|
],
|
||||||
|
[[0, new RegExp("(No source code was seen during the build\\.|No JavaScript or TypeScript code found\\.)"), 'foo bar']],
|
||||||
{
|
{
|
||||||
silent: true,
|
silent: true,
|
||||||
listeners: {
|
listeners: {
|
||||||
|
|
@ -381,14 +382,17 @@ function getCodeQLForCmd(cmd: string): CodeQL {
|
||||||
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
const traceCommand = path.resolve(JSON.parse(extractorPath), 'tools', 'autobuild' + ext);
|
||||||
|
|
||||||
// Run trace command
|
// Run trace command
|
||||||
await exec.exec(cmd, [
|
await exec_wrapper(
|
||||||
|
cmd, [
|
||||||
'database',
|
'database',
|
||||||
'trace-command',
|
'trace-command',
|
||||||
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
...getExtraOptionsFromEnv(['database', 'trace-command']),
|
||||||
databasePath,
|
databasePath,
|
||||||
'--',
|
'--',
|
||||||
traceCommand
|
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) {
|
finalizeDatabase: async function(databasePath: string) {
|
||||||
await exec_wrapper(
|
await exec_wrapper(
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue