mirror of
https://github.com/github/codeql-action.git
synced 2026-10-30 09:37:15 +00:00
Use temporary diagnostic dir in generateFailedSarif
This commit is contained in:
11
lib/entry-points.js
generated
11
lib/entry-points.js
generated
@@ -177370,7 +177370,7 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion) {
|
||||
}
|
||||
await new toolrunner3.ToolRunner(cmd, args).exec();
|
||||
},
|
||||
async diagnosticsExport(sarifFile, automationDetailsId, config) {
|
||||
async diagnosticsExport(sarifFile, automationDetailsId, config, diagnosticDir) {
|
||||
const args = [
|
||||
"diagnostics",
|
||||
"export",
|
||||
@@ -177379,6 +177379,7 @@ async function getCodeQLForCmd(logger2, cmd, checkVersion) {
|
||||
`--sarif-codescanning-config=${getGeneratedCodeScanningConfigPath(
|
||||
config
|
||||
)}`,
|
||||
...diagnosticDir !== void 0 ? [`--diagnostic-dir=${diagnosticDir}`] : [],
|
||||
...getExtraOptionsFromEnv(["diagnostics", "export"])
|
||||
];
|
||||
if (automationDetailsId !== void 0) {
|
||||
@@ -186909,7 +186910,13 @@ async function generateFailedSarif(logger2, features, config, category, checkout
|
||||
sarifFile = "../codeql-failed-run.sarif";
|
||||
}
|
||||
if (databasePath === void 0 || !await features.getValue("export_diagnostics_enabled" /* ExportDiagnosticsEnabled */, codeql)) {
|
||||
await codeql.diagnosticsExport(sarifFile, category, config);
|
||||
let diagnosticDir = getTempDiagnosticPath(
|
||||
config.tempDir
|
||||
);
|
||||
if (!fs31.existsSync(diagnosticDir)) {
|
||||
diagnosticDir = void 0;
|
||||
}
|
||||
await codeql.diagnosticsExport(sarifFile, category, config, diagnosticDir);
|
||||
} else {
|
||||
await codeql.databaseExportDiagnostics(databasePath, sarifFile, category);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user