Don't call trace-command when the indirect tracer has already been started

This commit is contained in:
Henry Mercer 2024-05-09 14:25:25 +01:00
parent 7d9b7a1870
commit 7a6352f8e6
9 changed files with 12 additions and 55 deletions

View file

@ -88,11 +88,7 @@ export interface CodeQL {
/**
* Runs the autobuilder for the given language.
*/
runAutobuild(
config: Config,
language: Language,
features: FeatureEnablement,
): Promise<void>;
runAutobuild(config: Config, language: Language): Promise<void>;
/**
* Extract code for a scanned language using 'codeql database trace-command'
* and running the language extractor.
@ -634,27 +630,9 @@ export async function getCodeQLForCmd(
{ stdin: externalRepositoryToken },
);
},
async runAutobuild(
config: Config,
language: Language,
features: FeatureEnablement,
) {
async runAutobuild(config: Config, language: Language) {
applyAutobuildAzurePipelinesTimeoutFix();
if (
await features.getValue(Feature.AutobuildDirectTracingEnabled, this)
) {
await runTool(cmd, [
"database",
"trace-command",
...(await getTrapCachingExtractorConfigArgsForLang(config, language)),
...getExtractionVerbosityArguments(config.debugMode),
...getExtraOptionsFromEnv(["database", "trace-command"]),
util.getCodeQLDatabasePath(config, language),
]);
return;
}
const autobuildCmd = path.join(
await this.resolveExtractor(language),
"tools",