Skip to content

Commit

Permalink
fix: os-packages missing-installed files
Browse files Browse the repository at this point in the history
Signed-off-by: chenk <[email protected]>
  • Loading branch information
chen-keinan committed Jan 2, 2024
1 parent 90c579c commit 66cb135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/fanal/applier/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ func ApplyLayers(layers []types.BlobInfo) types.ArtifactDetail {
return pkg.ID
})

newPackages := make(types.Packages, 0)
updatedPackages := make(types.Packages, 0)
lo.ForEach(pkgInfo.Packages, func(pkg types.Package, _ int) {
if mPkg, ok := mapPkgs[pkg.ID]; ok {
pkg.InstalledFiles = lo.Uniq(append(pkg.InstalledFiles, mPkg.InstalledFiles...))
}
newPackages = append(newPackages, pkg)
updatedPackages = append(updatedPackages, pkg)
})

nestedMap.SetByString(key, sep, types.PackageInfo{
FilePath: pkgInfo.FilePath,
Packages: newPackages,
Packages: updatedPackages,
})
}
}
Expand Down

0 comments on commit 66cb135

Please sign in to comment.