Don't include diagnostics if FF is off

This commit is contained in:
Michael B. Gale
2026-10-21 13:03:37 +01:00
parent 98b8e51380
commit 4707994e6e
3 changed files with 15 additions and 8 deletions

8
lib/entry-points.js generated
View File

@@ -187041,11 +187041,15 @@ async function generateFailedSarif(logger2, features, config, category, checkout
if (sarifFile === void 0) {
sarifFile = "../codeql-failed-run.sarif";
}
if (databasePath === void 0 || !await features.getValue("export_diagnostics_enabled" /* ExportDiagnosticsEnabled */, codeql)) {
const exportDiagnosticsEnabled = await features.getValue(
"export_diagnostics_enabled" /* ExportDiagnosticsEnabled */,
codeql
);
if (databasePath === void 0 || !exportDiagnosticsEnabled) {
let diagnosticDir = getTempDiagnosticPath(
config.tempDir
);
if (!fs31.existsSync(diagnosticDir)) {
if (!exportDiagnosticsEnabled || !fs31.existsSync(diagnosticDir)) {
diagnosticDir = void 0;
}
await codeql.diagnosticsExport(sarifFile, category, config, diagnosticDir);