Extract logging statements to separate function

This commit is contained in:
Andrew Eisenberg 2022-10-03 08:17:27 -07:00
parent 59fbe34861
commit 5960ce1190
9 changed files with 35 additions and 30 deletions

5
lib/config-utils.js generated
View file

@ -908,14 +908,11 @@ async function initConfig(languagesInput, queriesInput, packsInput, registriesIn
// When using the codescanning config in the CLI, pack downloads
// happen in the CLI during the `database init` command, so no need
// to download them here.
await (0, util_1.logCodeScanningConfigInCli)(codeQL, featureFlags, logger);
if (!(await (0, util_1.useCodeScanningConfigInCli)(codeQL, featureFlags))) {
logger.info("Code Scanning configuration file being processed in the codeql CLI.");
const registries = parseRegistries(registriesInput);
await downloadPacks(codeQL, config.languages, config.packs, registries, apiDetails, config.tempDir, logger);
}
else {
logger.info("Code Scanning configuration file being processed in the codeql-action.");
}
// Save the config so we can easily access it again in the future
await saveConfig(config, logger);
return config;