Skip to content

Commit

Permalink
fix: use location RealPath not String() (#1950)
Browse files Browse the repository at this point in the history
  • Loading branch information
luhring authored Jun 18, 2024
1 parent 239741f commit cb18897
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 cb18897

Please sign in to comment.