mirror of
https://github.com/aquasecurity/trivy.git
synced 2025-12-12 15:50:15 -08:00
refactor: reintroduce output writer (#5564)
Signed-off-by: knqyf263 <knqyf263@gmail.com>
This commit is contained in:
@@ -95,11 +95,11 @@ func (r *runner) run(ctx context.Context, artifacts []*k8sArtifacts.Artifact) er
|
||||
return xerrors.Errorf("k8s scan error: %w", err)
|
||||
}
|
||||
|
||||
output, err := r.flagOpts.OutputWriter()
|
||||
output, cleanup, err := r.flagOpts.OutputWriter()
|
||||
if err != nil {
|
||||
return xerrors.Errorf("failed to create output file: %w", err)
|
||||
}
|
||||
defer output.Close()
|
||||
defer cleanup()
|
||||
|
||||
if r.flagOpts.Compliance.Spec.ID != "" {
|
||||
var scanResults []types.Results
|
||||
|
||||
Reference in New Issue
Block a user