diff --git a/cmd/syft/cli/options/writer_test.go b/cmd/syft/cli/options/writer_test.go index f71d2b9d3..dfdc60a39 100644 --- a/cmd/syft/cli/options/writer_test.go +++ b/cmd/syft/cli/options/writer_test.go @@ -183,11 +183,7 @@ func Test_newSBOMMultiWriter(t *testing.T) { switch w := mw.writers[i].(type) { case *sbomStreamWriter: assert.Equal(t, string(w.format.ID()), e.format) - if e.file != "" { - assert.NotNil(t, w.out) - } else { - assert.NotNil(t, w.out) - } + assert.NotNil(t, w.out) if e.file != "" { assert.FileExists(t, tmp+e.file) }