Skip to content

Commit

Permalink
Adding build
Browse files Browse the repository at this point in the history
  • Loading branch information
bfattori committed Oct 15, 2024
1 parent 04bc3cc commit 01f86b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
9 changes: 4 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions src/detect/detect-facade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,6 @@ export class DetectFacade {
)
}

if (this.isDiagnosticModeEnabled()) {
const diagnosticZip = await this.getDiagnosticFilesPaths(outputPath)
await uploadArtifact('Detect Diagnostic Zip', outputPath, diagnosticZip)
}

return hasPolicyViolations
}

Expand Down Expand Up @@ -254,6 +249,12 @@ export class DetectFacade {
`${TOOL_NAME} exited with code ${detectExitCode} - ${exitCodeName}.`
)

// always process diagnostics regardless of exit code
if (this.isDiagnosticModeEnabled()) {
const diagnosticZip = await this.getDiagnosticFilesPaths(outputPath)
await uploadArtifact('Detect Diagnostic Zip', outputPath, diagnosticZip)
}

const isSuccessOrPolicyFailure =
detectExitCode === ExitCode.SUCCESS ||
detectExitCode === ExitCode.FAILURE_POLICY_VIOLATION
Expand Down

0 comments on commit 01f86b5

Please sign in to comment.