Store diagnostics in memory until the database is available

This commit is contained in:
Michael B. Gale 2024-04-11 14:18:19 +01:00
parent d4e7b0e493
commit 4b0172d9c2
No known key found for this signature in database
GPG key ID: FF5E2765BD00628F
6 changed files with 119 additions and 36 deletions

View file

@ -16,7 +16,7 @@ import {
import { getGitHubVersion } from "./api-client";
import { CodeQL } from "./codeql";
import * as configUtils from "./config-utils";
import { addDiagnostic, makeDiagnostic } from "./diagnostics";
import { addDiagnostic, flushDiagnostics, makeDiagnostic } from "./diagnostics";
import { EnvVar } from "./environment";
import { Feature, Features } from "./feature-flags";
import { checkInstallPython311, initCodeQL, initConfig, runInit } from "./init";
@ -522,6 +522,10 @@ async function run() {
}
}
// Write diagnostics to the database that we previously stored in memory because the database
// did not exist until now.
flushDiagnostics(config);
core.setOutput("codeql-path", config.codeQLCmd);
} catch (unwrappedError) {
const error = wrapError(unwrappedError);