Check that outputPath is non-empty

This commit is contained in:
Michael B. Gale committed 2025-10-24 14:42:36 +01:00
1 parent f0452d5366
commit 710606cc35
4 files changed
+5 -5

No files matched your search

+1 -1
View File
@@ -95936,7 +95936,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
}
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
const outputPath = pathInput || process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (outputPath !== void 0) {
if (outputPath !== void 0 && outputPath.trim() !== "") {
dumpSarifFile(
JSON.stringify(postProcessingResults.sarif),
outputPath,
+1 -1
View File
@@ -92750,7 +92750,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
}
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
const outputPath = pathInput || process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (outputPath !== void 0) {
if (outputPath !== void 0 && outputPath.trim() !== "") {
dumpSarifFile(
JSON.stringify(postProcessingResults.sarif),
outputPath,
+1 -1
View File
@@ -93406,7 +93406,7 @@ async function postProcessSarifFiles(logger, features, checkoutPath, sarifPaths,
}
async function writePostProcessedFiles(logger, pathInput, uploadTarget, postProcessingResults) {
const outputPath = pathInput || process.env["CODEQL_ACTION_SARIF_DUMP_DIR" /* SARIF_DUMP_DIR */];
if (outputPath !== void 0) {
if (outputPath !== void 0 && outputPath.trim() !== "") {
dumpSarifFile(
JSON.stringify(postProcessingResults.sarif),
outputPath,
+2 -2
View File
@@ -776,8 +776,8 @@ export async function writePostProcessedFiles(
// If there's an explicit input, use that. Otherwise, use the value from the environment variable.
const outputPath = pathInput || process.env[EnvVar.SARIF_DUMP_DIR];
// If we have an output path, write the SARIF file to it.
if (outputPath !== undefined) {
// If we have a non-empty output path, write the SARIF file to it.
if (outputPath !== undefined && outputPath.trim() !== "") {
dumpSarifFile(
JSON.stringify(postProcessingResults.sarif),
outputPath,