Check that outputPath is non-empty

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

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,