Skip to content

Commit 710606c

Browse files
committed
Check that outputPath is non-empty
1 parent f0452d5 commit 710606c

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/analyze-action.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-sarif-action.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/upload-lib.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,8 @@ export async function writePostProcessedFiles(
776776
// If there's an explicit input, use that. Otherwise, use the value from the environment variable.
777777
const outputPath = pathInput || process.env[EnvVar.SARIF_DUMP_DIR];
778778

779-
// If we have an output path, write the SARIF file to it.
780-
if (outputPath !== undefined) {
779+
// If we have a non-empty output path, write the SARIF file to it.
780+
if (outputPath !== undefined && outputPath.trim() !== "") {
781781
dumpSarifFile(
782782
JSON.stringify(postProcessingResults.sarif),
783783
outputPath,

0 commit comments

Comments
 (0)