mirror of
https://github.com/aquasecurity/trivy.git
synced 2026-02-11 03:03:29 +08:00
fix(license): return license separation using separators ,, or, etc. (#6916)
This commit is contained in:
@@ -7,10 +7,10 @@ import (
|
||||
"net/textproto"
|
||||
"strings"
|
||||
|
||||
"github.com/samber/lo"
|
||||
"golang.org/x/xerrors"
|
||||
|
||||
ftypes "github.com/aquasecurity/trivy/pkg/fanal/types"
|
||||
"github.com/aquasecurity/trivy/pkg/licensing"
|
||||
"github.com/aquasecurity/trivy/pkg/log"
|
||||
xio "github.com/aquasecurity/trivy/pkg/x/io"
|
||||
)
|
||||
@@ -87,7 +87,7 @@ func (p *Parser) Parse(r xio.ReadSeekerAt) ([]ftypes.Package, []ftypes.Dependenc
|
||||
{
|
||||
Name: name,
|
||||
Version: version,
|
||||
Licenses: lo.Ternary(license != "", []string{license}, nil),
|
||||
Licenses: licensing.SplitLicenses(license),
|
||||
},
|
||||
}, nil, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user