If distro name is unknown, try with the ID_LIKE

Signed-off-by: Jose Miguel Parrella <j@bureado.com>
This commit is contained in:
Jose Miguel Parrella 2021-06-25 21:17:49 -07:00
parent c825ae2404
commit c833472b6e

View File

@ -95,6 +95,12 @@ func assemble(name, version, like string) *Distro {
return nil
}
// If it's an unknown distro, try mapping the ID_LIKE
if !ok && len(like) != 0 {
name = like
distroType, ok = IDMapping[name]
}
if ok {
distro, err := NewDistro(distroType, version, like)
if err != nil {