From cb188974922a006c3a536f448d0072c541fee887 Mon Sep 17 00:00:00 2001 From: Dan Luhring Date: Tue, 18 Jun 2024 06:05:32 -0400 Subject: [PATCH] fix: use location RealPath not String() (#1950) --- grype/match/sort.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/grype/match/sort.go b/grype/match/sort.go index da257b425d5..a4b7e3e5ab6 100644 --- a/grype/match/sort.go +++ b/grype/match/sort.go @@ -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