Fix Fedora version check when VERSION_ID is decimal (#2549)

This fixes RHEL builds where VERSION_ID=7.9
This commit is contained in:
Mislav Marohnić 2025-06-30 17:16:09 +02:00 committed by GitHub
commit 205bea6a9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -211,7 +211,7 @@ is_fedora() {
# shellcheck disable=SC1091
source /etc/os-release
# Treat Aurora, Bazzite, BlueFin, uCore, and other Fedora variants as "fedora".
if [[ "${ID_LIKE:-$ID}" != "fedora" || ( $# -gt 0 && "$VERSION_ID" -lt "$1") ]]; then
if [[ "${ID_LIKE:-$ID}" != "fedora" || ( $# -gt 0 && "${VERSION_ID%%.*}" -lt "$1") ]]; then
return 1
fi
}