From afa267cebcad28d8c08ce5c081bebfb7e49bf843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 27 Jul 2021 12:25:29 +0200 Subject: [PATCH] distro: fix distro mangling for rhel-90 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to also mangle RHEL 9 in the same style as we do 8.4+. RHEL 8.0 => rhel-80 RHEL 8.1 => rhel-81 etc Signed-off-by: Ondřej Budai --- internal/distro/distro.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/distro/distro.go b/internal/distro/distro.go index f8e17bb43..5def9ae5e 100644 --- a/internal/distro/distro.go +++ b/internal/distro/distro.go @@ -171,7 +171,7 @@ func GetHostDistroName() (string, bool, bool, error) { // NOTE: We only consider major releases up until rhel 8.4 version := strings.Split(osrelease["VERSION_ID"], ".") name := osrelease["ID"] + "-" + version[0] - if osrelease["ID"] == "rhel" && version[0] == "8" && version[1] >= "4" { + if osrelease["ID"] == "rhel" && ((version[0] == "8" && version[1] >= "4") || version[0] == "9") { name = name + version[1] }