Fix export-diagnostics call

This commit is contained in:
Angela P Wen
2023-03-13 16:28:30 -07:00
parent ec89543aba
commit 6cce51b809
3 changed files with 9 additions and 10 deletions
Generated
+4 -4
View File
@@ -619,15 +619,15 @@ async function getCodeQLForCmd(cmd, checkVersion) {
const args = [
"database",
"export-diagnostics",
`${databasePath}`,
"--db-cluster",
"--format=sarif-latest",
`--output=${sarifFile}`,
(await features.getValue(feature_flags_1.Feature.ExportCodeScanningConfigEnabled, this))
? "--sarif-include-diagnostics"
: "",
...getExtraOptionsFromEnv(["diagnostics", "export"]),
];
args.push(databasePath);
if (await features.getValue(feature_flags_1.Feature.ExportDiagnosticsEnabled, this)) {
args.push("--sarif-include-diagnostics");
}
if (automationDetailsId !== undefined) {
args.push("--sarif-category", automationDetailsId);
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+4 -5
View File
@@ -1010,16 +1010,15 @@ export async function getCodeQLForCmd(
const args = [
"database",
"export-diagnostics",
`${databasePath}`,
"--db-cluster", // Database is always a cluster for CodeQL versions that support diagnostics.
"--format=sarif-latest",
`--output=${sarifFile}`,
(await features.getValue(Feature.ExportCodeScanningConfigEnabled, this))
? "--sarif-include-diagnostics"
: "",
...getExtraOptionsFromEnv(["diagnostics", "export"]),
];
args.push(databasePath);
if (await features.getValue(Feature.ExportDiagnosticsEnabled, this)) {
args.push("--sarif-include-diagnostics");
}
if (automationDetailsId !== undefined) {
args.push("--sarif-category", automationDetailsId);
}