Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c833472

Browse files
committed
If distro name is unknown, try with the ID_LIKE
Signed-off-by: Jose Miguel Parrella <[email protected]>
1 parent c825ae2 commit c833472

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

syft/distro/identify.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ func assemble(name, version, like string) *Distro {
9595
return nil
9696
}
9797

98+
// If it's an unknown distro, try mapping the ID_LIKE
99+
if !ok && len(like) != 0 {
100+
name = like
101+
distroType, ok = IDMapping[name]
102+
}
103+
98104
if ok {
99105
distro, err := NewDistro(distroType, version, like)
100106
if err != nil {

0 commit comments

Comments
 (0)