Skip to content

Commit

Permalink
fix: use location RealPath not String()
Browse files Browse the repository at this point in the history
Signed-off-by: Dan Luhring <dluhring@chainguard.dev>
  • Loading branch information
luhring committed Jun 17, 2024
1 parent 5821351 commit 0315bb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grype/match/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ func (m ByElements) Less(i, j int) bool {
loc2 := m[j].Package.Locations.ToSlice()
var locStr1 string
for _, location := range loc1 {
locStr1 += location.String()
locStr1 += location.RealPath
}
var locStr2 string
for _, location := range loc2 {
locStr2 += location.String()
locStr2 += location.RealPath
}

return locStr1 < locStr2
Expand Down

0 comments on commit 0315bb2

Please sign in to comment.