Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Goodman <alex.goodman@anchore.com>
  • Loading branch information
wagoodman committed Jun 23, 2023
1 parent 11b2624 commit bec2c22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion cmd/syft/cli/attest/attest.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ func execWorker(app *config.Application, si source.Input) <-chan error {
defer os.Remove(f.Name())

writer, err := options.MakeWriter(app.Outputs, f.Name(), app.OutputTemplatePath)
if err != nil {
errs <- fmt.Errorf("unable to create SBOM writer: %w", err)
return
}

if err := writer.Write(*s); err != nil {
errs <- fmt.Errorf("unable to write SBOM to temp file: %w", err)
Expand Down Expand Up @@ -188,7 +192,6 @@ func execWorker(app *config.Application, si source.Input) <-chan error {
}

mon.SetCompleted()

}()
return errs
}
Expand Down
1 change: 0 additions & 1 deletion cmd/syft/cli/options/writer.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ func MakeWriter(outputs []string, defaultFile, templateFilePath string) (sbom.Wr

// MakeWriterForFormat creates a sbom.Writer for for the given format or returns an error.
func MakeWriterForFormat(format sbom.Format, path string) (sbom.Writer, error) {

writer, err := newMultiWriter(newWriterOption(format, path))
if err != nil {
return nil, err
Expand Down

0 comments on commit bec2c22

Please sign in to comment.