mirror of
https://github.com/anchore/syft.git
synced 2026-11-03 07:56:36 +01:00
fix: closed reader during java binary detection (#4129)
Signed-off-by: Keith Zantow <kzantow@gmail.com>
This commit is contained in:
@@ -31,7 +31,7 @@ func BranchingEvidenceMatcher(classifiers ...Classifier) EvidenceMatcher {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return rdr, nil
|
||||
return &nonClosingUnionReader{rdr}, nil
|
||||
},
|
||||
})
|
||||
if len(pkgs) > 0 || err != nil {
|
||||
@@ -41,3 +41,11 @@ func BranchingEvidenceMatcher(classifiers ...Classifier) EvidenceMatcher {
|
||||
return nil, nil
|
||||
}
|
||||
}
|
||||
|
||||
type nonClosingUnionReader struct {
|
||||
unionreader.UnionReader
|
||||
}
|
||||
|
||||
func (c *nonClosingUnionReader) Close() error {
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user