Skip to content

Commit 1ecd563

Browse files
committed
Use getOptionalEnvVar in writePostProcessedFiles
1 parent ad35676 commit 1ecd563

File tree

4 files changed

+29
-8
lines changed

4 files changed

+29
-8
lines changed

lib/analyze-action.js

Lines changed: 9 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/upload-lib.js

Lines changed: 9 additions & 2 deletions
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: 9 additions & 2 deletions
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
@@ -774,10 +774,10 @@ export async function writePostProcessedFiles(
774774
postProcessingResults: PostProcessingResults,
775775
) {
776776
// If there's an explicit input, use that. Otherwise, use the value from the environment variable.
777-
const outputPath = pathInput || process.env[EnvVar.SARIF_DUMP_DIR];
777+
const outputPath = pathInput || util.getOptionalEnvVar(EnvVar.SARIF_DUMP_DIR);
778778

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

0 commit comments

Comments
 (0)